lib/rext/string/helpers.rb in visionmedia-rext-0.2.2 vs lib/rext/string/helpers.rb in visionmedia-rext-0.3.0
- old
+ new
@@ -1,32 +1,10 @@
require 'extlib'
+require 'digest/sha2'
+require 'digest/md5'
class String
-
- ##
- # Return Base 64 decoded string.
- #
- # === Examples
- #
- # 'Y29va2llcw=='.base64_decode # => cookies
- #
-
- def base64_decode
- unpack('m').first
- end
-
- ##
- # Return Base 64 encoded string.
- #
- # === Examples
- #
- # 'cookies'.base64_encode # => Y29va2llcw==
- #
-
- def base64_encode
- [self].pack('m').chop
- end
##
# Returns a File instance.
#
# === Examples