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

Innen: IT documentation
(Új oldal, tartalma: „==Description== Object-oriented style<syntaxhighlight lang="php"> public lnxUser::chkSalt( string $hash, string $salt ): bool </syntaxhighlight>Procedural style<syntaxh…”)
 
Nincs szerkesztési összefoglaló
 
(3 közbenső módosítás ugyanattól a szerkesztőtől nincs mutatva)
6. sor: 6. sor:
</syntaxhighlight>Checks the hash salt is valid.
</syntaxhighlight>Checks the hash salt is valid.
==Parameters==
==Parameters==
;salt
;hash
;You can read about password hash, salt, round relationships and requirements [https://www.php.net/manual/en/function.crypt here].
:The hash must be one of [https://doc.onlinesoft.org/index.php%3Ftitle=LnxUser_PHP_Class_Reference LNX_PH family of constants].
; salt
: You can read about password hash, salt, round relationships and requirements [https://www.php.net/manual/en/function.crypt here].
 
==Return Values==
==Return Values==
Returns '''true''' if salt is valid, '''false''' otherwise.
Returns '''true''' if salt is valid, '''false''' otherwise.
==Changelog==
==Changelog==
{| class="wikitable"
{| class="wikitable"
!Version
!Version<br>(lnxUser)
(lnxUser)
!Description
!Description
|-
|-
19. sor: 21. sor:
|available
|available
|}
|}
==Examples==
==Examples==
<syntaxhighlight lang="php">
<syntaxhighlight lang="php">
26. sor: 29. sor:
     print ( 'Salt is invalid' . PHP_EOL );
     print ( 'Salt is invalid' . PHP_EOL );
</syntaxhighlight>
</syntaxhighlight>
[[Kategória:LnxUser]]

A lap jelenlegi, 2021. szeptember 23., 20:11-kori változata

Description

Object-oriented style

public lnxUser::chkSalt( string $hash, string $salt ): bool

Procedural style

public lnxChkSalt( string $hash, string $salt ): bool

Checks the hash salt is valid.

Parameters

hash
The hash must be one of LNX_PH family of constants.
salt
You can read about password hash, salt, round relationships and requirements here.

Return Values

Returns true if salt is valid, false otherwise.

Changelog

Version
(lnxUser)
Description
1.2 available

Examples

if ( lnxChkSalt( LNX_PH_MD5 , "abcd1234" ) ) 
    print ( 'Salt is valid' . PHP_EOL );
else
    print ( 'Salt is invalid' . PHP_EOL );