lib/jwe/enc/aes_gcm.rb in jwe-0.1.0 vs lib/jwe/enc/aes_gcm.rb in jwe-0.1.1
- old
+ new
@@ -33,11 +33,11 @@
cipher.auth_tag = tag
cipher.auth_data = authenticated_data
cipher.update(ciphertext) + cipher.final
rescue OpenSSL::Cipher::CipherError
- raise JWE::InvalidData.new("Invalid ciphertext or authentication tag")
+ raise JWE::InvalidData.new('Invalid ciphertext or authentication tag')
end
def iv
@iv ||= SecureRandom.random_bytes(12)
end
@@ -51,10 +51,10 @@
rescue RuntimeError
raise JWE::NotImplementedError.new("The version of OpenSSL linked to your Ruby does not support the cipher #{cipher_name}.")
end
def tag
- @tag || ""
+ @tag || ''
end
def self.included(base)
base.extend(ClassMethods)
end