aboutsummaryrefslogtreecommitdiffstats
path: root/include/crypto.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/crypto.php')
-rw-r--r--include/crypto.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/crypto.php b/include/crypto.php
index ca01814da..e9372fbb4 100644
--- a/include/crypto.php
+++ b/include/crypto.php
@@ -75,6 +75,8 @@ function aes_encapsulate($data,$pubkey) {
}
function crypto_unencapsulate($data,$prvkey) {
+ if(! $data)
+ return;
$alg = ((array_key_exists('alg',$data)) ? $data['alg'] : 'aes256cbc');
if($alg === 'aes256cbc')
return aes_unencapsulate($data,$prvkey);