diff --git a/lib/rbnacl/encoders/base64.rb b/lib/rbnacl/encoders/base64.rb
index <HASH>..<HASH> 100644
--- a/lib/rbnacl/encoders/base64.rb
+++ b/lib/rbnacl/encoders/base64.rb
@@ -13,7 +13,7 @@ module Crypto
       #
       # @return [String] Clunky old base64
       def encode(bytes)
-        [bytes].pack("m0")
+        [bytes].pack("m").gsub("\n", '')
       end
 
       # Hex decodes a message
Strip base<I> carriage returns

This is necessary for Ruby <I> compatibility