md5
require 'md5'
puts MD5.hexdigest('')
puts MD5.hexdigest('')
sha1
require 'digest/sha1'
puts Digest::SHA1.hexdigest('')
puts Digest::SHA1.hexdigest('')
base64
require 'base64'
code = Base64.encode64('hallo')
source = Base64.decode64(code)
code = Base64.encode64('hallo')
source = Base64.decode64(code)
uri
src = 'abc编码asdf'
code = URI.encode src
src = URI.decode code
puts code
puts src
code = URI.encode src
src = URI.decode code
puts code
puts src