PHP Class Airship\Engine\Security\Migration\WordPress

Inheritance: implements Airship\Engine\Security\Migration\MigrationInterface
Show file Open project: paragonie/airship

Protected Properties

Property Type Description
$itoa64 string
$key EncryptionKey

Public Methods

Method Description
getHashWithMetadata ( string $oldHash, EncryptionKey $passwordKey = null ) : array Use during imports to populate a table with metadata and a rehashed hash.
setPasswordKey ( EncryptionKey $passwordKey ) : Airship\Engine\Security\Migration\MigrationInterface
validate ( HiddenString $password, HiddenString $pHash, array $migrationData, EncryptionKey $passwordKey = null ) : boolean Validate a user-provided password with user

Private Methods

Method Description
encode64 ( string $input, integer $count ) : string Wordpress's specific variant of Base64DotSlash encoding.
wordPressCryptPrivate ( HiddenString $password, string $setting ) : string WordPress's internal password hashing algorithm. Only used for migrations.

Method Details

getHashWithMetadata() public method

Use during imports to populate a table with metadata and a rehashed hash.
public getHashWithMetadata ( string $oldHash, EncryptionKey $passwordKey = null ) : array
$oldHash string
$passwordKey EncryptionKey
return array [HiddenString, array]

setPasswordKey() public method

public setPasswordKey ( EncryptionKey $passwordKey ) : Airship\Engine\Security\Migration\MigrationInterface
$passwordKey EncryptionKey
return Airship\Engine\Security\Migration\MigrationInterface

validate() public method

Validate a user-provided password with user
public validate ( HiddenString $password, HiddenString $pHash, array $migrationData, EncryptionKey $passwordKey = null ) : boolean
$password Airship\Engine\Security\HiddenString
$pHash Airship\Engine\Security\HiddenString
$migrationData array
$passwordKey EncryptionKey
return boolean

Property Details

$itoa64 protected property

protected string $itoa64
return string

$key protected property

protected EncryptionKey $key
return EncryptionKey