„LnxUser::getPassHash” változatai közötti eltérés

Innen: IT documentation
8. sor: 8. sor:
Creates a password hash.
Creates a password hash.


MD5, SHA-256, SHA-512 password hash methods are implemented.
DES, Extended DES, MD5, BLOWFISH, SHA-256, SHA-512 password hash methods are implemented.


== Parameters ==
== Parameters ==
31. sor: 31. sor:
!Version<br>(lnxUser)
!Version<br>(lnxUser)
!Description
!Description
|-
|1.2
|add: round hadle
|-
|-
|1.1
|1.1

A lap 2021. szeptember 23., 19:16-kori változata

Description

Object-oriented style

public lnxUser::getPassHash ( string $password, string $hash = '', string $salt = '', string|int $round = '' ): string

Procedural style

lnxGetPassHash ( string $password, string $hash = '', string $salt = '', string|int $round = '' ): string

Creates a password hash.

DES, Extended DES, MD5, BLOWFISH, SHA-256, SHA-512 password hash methods are implemented.

Parameters

password
Password string.
hash
Password hash algorithm type. Use LNX_PH family of constants.
If empty will be used the default hash method.
salt
Password hash salt. Must be alphanumeric.
If empty salt will be generated.
round
Password hash rounds. Must be alphanumeric or integer.
If empty salt will be generated.

Return Values

Returns a hashed password or empty if an error occurred.

Changelog

Version
(lnxUser)
Description
1.2 add: round hadle
1.1 remove: mkpassword dependency
add: default hash handle
1.00 available

Examples

$hash = lnxGetPassHash ( 'HelloNSA' );

print( "Password hash is $hash." . PHP_EOL );