diff --git a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Crypto.pm b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Crypto.pm index 2edf31e15..c5e3f4d94 100644 --- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Crypto.pm +++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Crypto.pm @@ -21,6 +21,7 @@ $hash = \&Digest::SHA::sha256; use constant HMAC_LENGTH => 32; use constant IV_LENGTH => 16; +# Build initialization vector subroutine BEGIN { eval { require Crypt::URandom; Crypt::URandom::urandom(IV_LENGTH) }; if ($@) {