diff --git a/lib/Client.php b/lib/Client.php index 9c70850..77eac12 100644 --- a/lib/Client.php +++ b/lib/Client.php @@ -448,7 +448,7 @@ private function getNetwork($n) return $nf; } - public function encrypt($data, $key, $cipher_type = "AES-256-ECB", $iv = "", $auth_data = null) + public function encrypt($data, $key, $cipher_type = "AES-256-ECB", $iv = NULL, $auth_data = null) { # encryption using AES-256-ECB, AES-256-CBC, AES-256-GCM # data is string, key is hex string @@ -496,7 +496,7 @@ public function pinToAesKey($pin, $iterations = 2048, $salt = "", $hash_function return $enc_key_32; } - public function decrypt($b64ciphertext, $key, $cipher_type = "AES-256-ECB", $iv = "", $auth_tag = NULL, $auth_data = NULL) + public function decrypt($b64ciphertext, $key, $cipher_type = "AES-256-ECB", $iv = NULL, $auth_tag = NULL, $auth_data = NULL) { # data must be in base64 string, $key is binary of hashed pincode