Skip to content

Commit 72af380

Browse files
Merge pull request #9 from PrisisForks/master
Added doc for \InvalidArgumentException on hashAndEncrypt
2 parents 02f2a5b + b08248c commit 72af380

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/PasswordLock.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class PasswordLock
1717
* @param Key $aesKey
1818
* @return string
1919
* @throws \Exception
20+
* @throws \InvalidArgumentException
2021
*/
2122
public static function hashAndEncrypt(string $password, Key $aesKey): string
2223
{
@@ -103,10 +104,10 @@ public static function decryptAndVerify(string $password, string $ciphertext, Ke
103104
$hash
104105
);
105106
}
106-
107+
107108
/**
108109
* Key rotation method -- decrypt with your old key then re-encrypt with your new key
109-
*
110+
*
110111
* @param string $ciphertext
111112
* @param Key $oldKey
112113
* @param Key $newKey
@@ -117,10 +118,10 @@ public static function rotateKey(string $ciphertext, Key $oldKey, Key $newKey):
117118
$plaintext = Crypto::decrypt($ciphertext, $oldKey);
118119
return Crypto::encrypt($plaintext, $newKey);
119120
}
120-
121+
121122
/**
122123
* For migrating from an older version of the library
123-
*
124+
*
124125
* @param string $password
125126
* @param string $ciphertext
126127
* @param string $oldKey

0 commit comments

Comments
 (0)