lib/ably/util/crypto.rb in ably-0.7.0 vs lib/ably/util/crypto.rb in ably-0.7.1
- old
+ new
@@ -60,10 +60,10 @@
# @param [String] encrypted_payload_with_iv the encrypted payload to be decrypted
#
# @return [String]
#
def decrypt(encrypted_payload_with_iv)
- raise Ably::Exceptions::EncryptionError, 'iv is missing or not long enough' unless encrypted_payload_with_iv.length >= BLOCK_LENGTH*2
+ raise Ably::Exceptions::CipherError, 'iv is missing or not long enough' unless encrypted_payload_with_iv.length >= BLOCK_LENGTH*2
iv = encrypted_payload_with_iv.slice(0...BLOCK_LENGTH)
encrypted_payload = encrypted_payload_with_iv.slice(BLOCK_LENGTH..-1)
decipher = openssl_cipher