lib/lockbox.rb in lockbox-0.2.4 vs lib/lockbox.rb in lockbox-0.2.5

- old
+ new

@@ -139,9 +139,14 @@ new_io = Lockbox::IO.new(decrypt(io.read, **options)) copy_metadata(io, new_io) new_io end + def decrypt_str(ciphertext, **options) + message = decrypt(ciphertext, **options) + message.force_encoding(Encoding::UTF_8) + end + def self.generate_key SecureRandom.hex(32) end def self.generate_key_pair