Skip to content

Commit

Permalink
Merge pull request #7394 from AshleyPinner/patch-1
Browse files Browse the repository at this point in the history
Use OPENSSL constants rather than a bool
  • Loading branch information
markstory committed Sep 14, 2015
2 parents 353f3c1 + a05d02d commit 4d75540
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Utility/Crypto/OpenSsl.php
Expand Up @@ -61,7 +61,7 @@ public static function encrypt($plain, $key, $hmacSalt = null)
$ivSize = openssl_cipher_iv_length($method);

$iv = openssl_random_pseudo_bytes($ivSize);
return $iv . openssl_encrypt($plain, $method, $key, true, $iv);
return $iv . openssl_encrypt($plain, $method, $key, OPENSSL_RAW_DATA, $iv);
}

/**
Expand All @@ -80,6 +80,6 @@ public static function decrypt($cipher, $key)
$iv = mb_substr($cipher, 0, $ivSize, '8bit');

$cipher = mb_substr($cipher, $ivSize, null, '8bit');
return openssl_decrypt($cipher, $method, $key, true, $iv);
return openssl_decrypt($cipher, $method, $key, OPENSSL_RAW_DATA, $iv);
}
}

0 comments on commit 4d75540

Please sign in to comment.