Skip to content

Commit

Permalink
:octocat: phpstan made me do it
Browse files Browse the repository at this point in the history
  • Loading branch information
codemasher committed Nov 2, 2024
1 parent fc4c764 commit cf35ad3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Crypto.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ public static function sha512(string $data, bool $binary = false):string{
/**
* Generates a secure random string of the given $length, using the characters (8-bit byte) in the given $keyspace.
*
* @throws \Random\RandomException
*
* @noinspection PhpFullyQualifiedNameUsageInspection
* @SuppressWarnings(PHPMD.MissingImport)
*/
Expand Down Expand Up @@ -105,7 +103,7 @@ public static function createEncryptionKey():string{
* @see \sodium_bin2base64()
* @see \sodium_bin2hex()
*
* @throws \SodiumException|\Random\RandomException
* @throws \SodiumException
*/
public static function encrypt(string $data, string $keyHex, int $format = self::ENCRYPT_FORMAT_HEX):string{
$nonce = random_bytes(SODIUM_CRYPTO_SECRETBOX_NONCEBYTES);
Expand Down

0 comments on commit cf35ad3

Please sign in to comment.