Namespaces

  • Latte
    • Loaders
    • Macros
    • Runtime
  • Nette
    • Application
      • Responses
      • Routers
      • UI
    • Bridges
      • ApplicationDI
      • ApplicationLatte
      • ApplicationTracy
      • CacheDI
      • CacheLatte
      • DatabaseDI
      • DatabaseTracy
      • DITracy
      • FormsDI
      • FormsLatte
      • Framework
      • HttpDI
      • HttpTracy
      • MailDI
      • ReflectionDI
      • SecurityDI
      • SecurityTracy
    • Caching
      • Storages
    • ComponentModel
    • Database
      • Conventions
      • Drivers
      • Reflection
      • Table
    • DI
      • Config
        • Adapters
      • Extensions
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Loaders
    • Localization
    • Mail
    • Neon
    • PhpGenerator
    • Reflection
    • Security
    • Utils
  • none
  • Tracy
    • Bridges
      • Nette

Classes

  • Identity
  • Passwords
  • Permission
  • SimpleAuthenticator
  • User

Interfaces

  • IAuthenticator
  • IAuthorizator
  • IIdentity
  • IResource
  • IRole
  • IUserStorage

Exceptions

  • AuthenticationException
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Other releases
  • Nette homepage

Class Passwords

Passwords tools. Requires PHP >= 5.3.7.

Namespace: Nette\Security
Located at Security/Passwords.php
Methods summary
public static string
# hash( string $password, array $options = NULL )

Computes salted password hash.

Computes salted password hash.

Parameters

$password
$options
cost (4-31), salt (22 chars)

Returns

string
60 chars long
public static boolean
# verify( $password, $hash )

Verifies that a password matches a hash.

Verifies that a password matches a hash.

Returns

boolean
bool
public static boolean
# needsRehash( string $hash, array $options = NULL )

Checks if the given hash matches the options.

Checks if the given hash matches the options.

Parameters

$hash
$options
cost (4-31)

Returns

boolean
bool
Constants summary
integer BCRYPT_COST
#10
Nette 2.3-20161221 API API documentation generated by ApiGen 2.8.0