class Mail::Encodings::Base64

Constants

NAME
PRIORITY

Public Class Methods

can_encode?(enc) click to toggle source
# File lib/mail/encodings/base64.rb, line 10
def self.can_encode?(enc)
  true
end
cost(str) click to toggle source

Base64 has a fixed cost, 4 bytes out per 3 bytes in

# File lib/mail/encodings/base64.rb, line 25
def self.cost(str)
  4.0/3
end
decode(str) click to toggle source

Decode the string from Base64

# File lib/mail/encodings/base64.rb, line 15
def self.decode(str)
  RubyVer.decode_base64( str )
end
encode(str) click to toggle source

Encode the string to Base64

# File lib/mail/encodings/base64.rb, line 20
def self.encode(str)
  RubyVer.encode_base64( str ).to_crlf
end