메소드 |
설명 |
|
decryptAndVerify ( string $password, string $ciphertext, Defuse\Crypto\Key $aesKey ) : boolean |
1. VerifyHMAC-then-Decrypt the ciphertext to get the hash
2. Verify that the password matches the hash |
|
decryptAndVerifyLegacy ( string $password, string $ciphertext, string $aesKey ) : boolean |
1. VerifyHMAC-then-Decrypt the ciphertext to get the hash
2. Verify that the password matches the hash |
|
hashAndEncrypt ( string $password, Defuse\Crypto\Key $aesKey ) : string |
1. Hash password using bcrypt-base64-SHA256
2. Encrypt-then-MAC the hash |
|
rotateKey ( string $ciphertext, Defuse\Crypto\Key $oldKey, Defuse\Crypto\Key $newKey ) : string |
Key rotation method -- decrypt with your old key then re-encrypt with your new key |
|
upgradeFromVersion1 ( string $password, string $ciphertext, string $oldKey, Defuse\Crypto\Key $newKey ) : string |
For migrating from an older version of the library |
|