call correct Log class with 2 params instead of 1

see https://github.com/the-djmaze/snappymail/issues/657
This commit is contained in:
joergmschulz 2022-11-11 22:08:56 +01:00 committed by GitHub
parent a13bb9e930
commit b14958a89d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -99,14 +99,14 @@ abstract class Crypt
$nonce = \random_bytes(\SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES); $nonce = \random_bytes(\SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES);
return ['sodium', $nonce, static::SodiumEncrypt($data, $nonce, $key)]; return ['sodium', $nonce, static::SodiumEncrypt($data, $nonce, $key)];
} catch (\Throwable $e) { } catch (\Throwable $e) {
Log::error($e->getMessage()); \SnappyMail\Log::error('Crypt', $e->getMessage());
} }
try { try {
$iv = \random_bytes(\openssl_cipher_iv_length(static::$cipher)); $iv = \random_bytes(\openssl_cipher_iv_length(static::$cipher));
return ['openssl', $iv, static::OpenSSLEncrypt($data, $iv, $key)]; return ['openssl', $iv, static::OpenSSLEncrypt($data, $iv, $key)];
} catch (\Throwable $e) { } catch (\Throwable $e) {
Log::error($e->getMessage()); \SnappyMail\Log::error('Crypt', $e->getMessage());
} }
$salt = \random_bytes(16); $salt = \random_bytes(16);