ÿØÿà JFIF ÿÛ „ ( %!1!%*+...983,7(-.-
urlsafe_encode64-i.ri 0000644 00000001202 15240144741 0010453 0 ustar 00 U:RDoc::AnyMethod[iI"urlsafe_encode64:ETI"Base64#urlsafe_encode64;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"2Returns the Base64-encoded version of +bin+. ;TI"MThis method complies with ``Base 64 Encoding with URL and Filename Safe ;TI"Alphabet'' in RFC 4648. ;TI"BThe alphabet uses '-' instead of '+' and '_' instead of '/'. ;TI"1Note that the result can still contain '='. ;TI">You can remove the padding by setting +padding+ as false.;T:
@fileI"lib/base64.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(bin, padding: true);T@FI"Base64;TcRDoc::NormalModule00 cdesc-Base64.ri 0000644 00000002446 15240144741 0007213 0 ustar 00 U:RDoc::NormalModule[iI"Base64:ET@0o:RDoc::Markup::Document:@parts[o;;[
o:RDoc::Markup::Paragraph;[I"OThe Base64 module provides for the encoding (#encode64, #strict_encode64, ;TI"C#urlsafe_encode64) and decoding (#decode64, #strict_decode64, ;TI"E#urlsafe_decode64) of binary data using a Base64 representation.;To:RDoc::Markup::BlankLine S:RDoc::Markup::Heading:
leveli: textI"Example;T@o; ;[I"$A simple encoding and decoding.;T@o:RDoc::Markup::Verbatim;[I"require "base64"
;TI"
;TI"4enc = Base64.encode64('Send reinforcements')
;TI"? # -> "U2VuZCByZWluZm9yY2VtZW50cw==\n"
;TI""plain = Base64.decode64(enc)
;TI"4 # -> "Send reinforcements"
;T:@format0o; ;[I"JThe purpose of using base64 to encode data is that it translates any ;TI"2binary data into purely printable characters.;T:
@fileI"lib/base64.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[ [ [ [[I"
class;T[[:public[ [:protected[ [:private[ [I"
instance;T[[;[ [;[ [;[[I"
decode64;TI"lib/base64.rb;T[I"
encode64;T@<[I"strict_decode64;T@<[I"strict_encode64;T@<[I"urlsafe_decode64;T@<[I"urlsafe_encode64;T@<[ [U:RDoc::Context::Section[i 0o;;[ ;0;0[I"lib/base64.rb;T@#cRDoc::TopLevel decode64-i.ri 0000644 00000001463 15240144741 0006731 0 ustar 00 U:RDoc::AnyMethod[iI"
decode64:ETI"Base64#decode64;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"2Returns the Base64-decoded version of +str+. ;TI")This method complies with RFC 2045. ;TI"6Characters outside the base alphabet are ignored.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [
I"require 'base64'
;TI".str = 'VGhpcyBpcyBsaW5lIG9uZQpUaGlzIG' +
;TI". 'lzIGxpbmUgdHdvClRoaXMgaXMgbGlu' +
;TI"* 'ZSB0aHJlZQpBbmQgc28gb24uLi4K'
;TI"puts Base64.decode64(str)
;T:@format0o;
; [I"Generates:;T@o;; [ I"This is line one
;TI"This is line two
;TI"This is line three
;TI"And so on...;T;
0:
@fileI"lib/base64.rb;T:0@omit_headings_from_table_of_contents_below000[ I"
(str);T@!FI"Base64;TcRDoc::NormalModule00 strict_decode64-i.ri 0000644 00000001007 15240144741 0010313 0 ustar 00 U:RDoc::AnyMethod[iI"strict_decode64:ETI"Base64#strict_decode64;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [ I"2Returns the Base64-decoded version of +str+. ;TI")This method complies with RFC 4648. ;TI"HArgumentError is raised if +str+ is incorrectly padded or contains ;TI"Dnon-alphabet characters. Note that CR or LF are also rejected.;T:
@fileI"lib/base64.rb;T:0@omit_headings_from_table_of_contents_below000[ I"
(str);T@FI"Base64;TcRDoc::NormalModule00 strict_encode64-i.ri 0000644 00000000626 15240144741 0010333 0 ustar 00 U:RDoc::AnyMethod[iI"strict_encode64:ETI"Base64#strict_encode64;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"2Returns the Base64-encoded version of +bin+. ;TI")This method complies with RFC 4648. ;TI"No line feeds are added.;T:
@fileI"lib/base64.rb;T:0@omit_headings_from_table_of_contents_below000[ I"
(bin);T@FI"Base64;TcRDoc::NormalModule00 encode64-i.ri 0000644 00000001314 15240144741 0006736 0 ustar 00 U:RDoc::AnyMethod[iI"
encode64:ETI"Base64#encode64;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"2Returns the Base64-encoded version of +bin+. ;TI")This method complies with RFC 2045. ;TI"9Line feeds are added to every 60 encoded characters.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"require 'base64'
;TI"KBase64.encode64("Now is the time for all good coders\nto learn Ruby")
;T:@format0o;
; [I"Generates:;T@o;; [I"BTm93IGlzIHRoZSB0aW1lIGZvciBhbGwgZ29vZCBjb2RlcnMKdG8gbGVhcm4g
;TI"
UnVieQ==;T;
0:
@fileI"lib/base64.rb;T:0@omit_headings_from_table_of_contents_below000[ I"
(bin);T@FI"Base64;TcRDoc::NormalModule00 urlsafe_decode64-i.ri 0000644 00000001314 15240144741 0010445 0 ustar 00 U:RDoc::AnyMethod[iI"urlsafe_decode64:ETI"Base64#urlsafe_decode64;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [ I"2Returns the Base64-decoded version of +str+. ;TI"MThis method complies with ``Base 64 Encoding with URL and Filename Safe ;TI"Alphabet'' in RFC 4648. ;TI"AThe alphabet uses '-' instead of '+' and '_' instead of '/'.;To:RDoc::Markup::BlankLine o;
; [I"(The padding character is optional. ;TI"CThis method accepts both correctly-padded and unpadded input. ;TI"9Note that it still rejects incorrectly-padded input.;T:
@fileI"lib/base64.rb;T:0@omit_headings_from_table_of_contents_below000[ I"
(str);T@FI"Base64;TcRDoc::NormalModule00