HashStrategy

Determines how the hashing is computed in the implementation You can implement this to provide a different hashing strategy to the default.

package

Default

Methods

__construct

__construct() 

Compute the hashed password given the unhashed password and the user

computeHash( $arg0,  $arg1) : string

Arguments

$arg0

string

$arg1

User

Response

string

the hashed password

Retrieve the salt. The source of the salt can be the external salt or the propriate column of the given user, depending on the defined {@link io.vertx.ext.auth.mongo.HashSaltStyle}

getSalt( $arg0) : string

Arguments

$arg0

User

Response

string

null in case of {@link HashSaltStyle#NO_SALT} the salt of the user or a defined external salt

Get the defined {@link io.vertx.ext.auth.mongo.HashSaltStyle} of the current instance

getSaltStyle() : string

Response

string

the saltStyle

Retrieve the password from the user, or as clear text or as hashed version, depending on the definition

getStoredPwd( $arg0) : string

Arguments

$arg0

User

Response

string

the password, either as hashed version or as cleartext, depending on the preferences

Allows the selection of the hashing algorithm.

setAlgorithm( $arg0) : void

Arguments

$arg0

string

Set an external salt. This method should be used in case of

setExternalSalt( $arg0) : void

Arguments

$arg0

string

Set the saltstyle as defined by {@link io.vertx.ext.auth.mongo.HashSaltStyle}.

setSaltStyle( $arg0) : void

Arguments

$arg0

string