lib/symmetric_encryption/symmetric_encryption.rb in symmetric-encryption-0.8.0 vs lib/symmetric_encryption/symmetric_encryption.rb in symmetric-encryption-0.9.0

- old
+ new

@@ -158,13 +158,10 @@ end true end - # Future: Generate private key in config file generator - #new_key = OpenSSL::PKey::RSA.generate(2048) - # Generate new random symmetric keys for use with this Encryption library # # Note: Only the current Encryption key settings are used # # Creates Symmetric Key .key @@ -306,8 +303,14 @@ :key => rsa.private_decrypt(encrypted_key), :iv => iv, :cipher => cipher_conf[:cipher], :encoding => cipher_conf[:encoding] ) + end + + # With Ruby 1.9 strings have encodings + if defined?(Encoding) + BINARY_ENCODING = Encoding.find("binary") + UTF8_ENCODING = Encoding.find("UTF-8") end end \ No newline at end of file