<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,7 @@
 == master
 
+* Use pack/unpack instead of Base64 to be compatible with Ruby 1.9+
+
 == 0.3.1 / 2008-12-4
 
 * Fix symmetric ciphers not working on Ruby 1.8.6 and below</diff>
      <filename>CHANGELOG.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,5 @@
+require 'openssl'
+
 require 'encrypted_strings/extensions/string'
 require 'encrypted_strings/cipher'
 require 'encrypted_strings/symmetric_cipher'</diff>
      <filename>lib/encrypted_strings.rb</filename>
    </modified>
    <modified>
      <diff>@@ -107,7 +107,7 @@ module EncryptedStrings
       raise NoPublicKeyError, &quot;Public key file: #{public_key_file}&quot; unless public?
       
       encrypted_data = public_rsa.public_encrypt(data)
-      Base64.encode64(encrypted_data)
+      [encrypted_data].pack('m')
     end
     
     # Decrypts the given data. If no private key file has been specified, then
@@ -115,7 +115,7 @@ module EncryptedStrings
     def decrypt(data)
       raise NoPrivateKeyError, &quot;Private key file: #{private_key_file}&quot; unless private?
       
-      decrypted_data = Base64.decode64(data)
+      decrypted_data = data.unpack('m')[0]
       private_rsa.private_decrypt(decrypted_data)
     end
     </diff>
      <filename>lib/encrypted_strings/asymmetric_cipher.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,3 @@
-require 'openssl'
-require 'base64'
-
 module EncryptedStrings
   module Extensions #:nodoc:
     # Adds support for in-place encryption/decryption of strings</diff>
      <filename>lib/encrypted_strings/extensions/string.rb</filename>
    </modified>
    <modified>
      <diff>@@ -81,13 +81,13 @@ module EncryptedStrings
     # Decrypts the current string using the current key and algorithm specified
     def decrypt(data)
       cipher = build_cipher(:decrypt)
-      cipher.update(Base64.decode64(data)) + cipher.final
+      cipher.update(data.unpack('m')[0]) + cipher.final
     end
     
     # Encrypts the current string using the current key and algorithm specified
     def encrypt(data)
       cipher = build_cipher(:encrypt)
-      Base64.encode64(cipher.update(data) + cipher.final)
+      [cipher.update(data) + cipher.final].pack('m')
     end
     
     private</diff>
      <filename>lib/encrypted_strings/symmetric_cipher.rb</filename>
    </modified>
    <modified>
      <diff>@@ -72,10 +72,11 @@ class ShaCipherWithNonStringSaltTest &lt; Test::Unit::TestCase
   require 'time'
   
   def setup
-    @sha_cipher = EncryptedStrings::ShaCipher.new(:salt =&gt; Time.parse('Tue Jan 01 00:00:00 UTC 2008'))
+    @time = Time.parse('Tue Jan 01 00:00:00 UTC 2008')
+    @sha_cipher = EncryptedStrings::ShaCipher.new(:salt =&gt; @time)
   end
   
   def test_should_stringify_salt
-    assert_equal 'Tue Jan 01 00:00:00 UTC 2008', @sha_cipher.salt
+    assert_equal @time.to_s, @sha_cipher.salt
   end
 end</diff>
      <filename>test/sha_cipher_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>3f7b0645147a1bd6ef8bfb7807c66cf952f883cf</id>
    </parent>
  </parents>
  <author>
    <name>Aaron Pfeifer</name>
    <email>aaron.pfeifer@gmail.com</email>
  </author>
  <url>http://github.com/pluginaweek/encrypted_strings/commit/ef725e27eefdd42e650b90bdacffc667b7b28c86</url>
  <id>ef725e27eefdd42e650b90bdacffc667b7b28c86</id>
  <committed-date>2008-12-29T21:20:37-08:00</committed-date>
  <authored-date>2008-12-29T21:20:37-08:00</authored-date>
  <message>Use Array#pack/String#unpack instead of Base64 to be compatible with Ruby 1.9+</message>
  <tree>1750a550562b8f8e4b5f664f2550eb6b4dbc91b5</tree>
  <committer>
    <name>Aaron Pfeifer</name>
    <email>aaron.pfeifer@gmail.com</email>
  </committer>
</commit>
