Repository URL to install this package:
|
Version:
2.2.2-1 ▾
|
U:RDoc::AnyMethod[iI"urlsafe_base64:EFI"!SecureRandom::urlsafe_base64;FT:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"KSecureRandom.urlsafe_base64 generates a random URL-safe base64 string.;To:RDoc::Markup::BlankLine o; ; [I"KThe argument _n_ specifies the length, in bytes, of the random number ;TI"Jto be generated. The length of the result string is about 4/3 of _n_.;T@o; ; [I"7If _n_ is not specified or is nil, 16 is assumed. ;TI" It may be larger in future.;T@o; ; [ I";The boolean argument _padding_ specifies the padding. ;TI"6If it is false or nil, padding is not generated. ;TI"%Otherwise padding is generated. ;TI"UBy default, padding is not generated because "=" may be used as a URL delimiter.;T@o; ; [I"8The result may contain A-Z, a-z, 0-9, "-" and "_". ;TI"+"=" is also used if _padding_ is true.;T@o:RDoc::Markup::Verbatim; [ I"@p SecureRandom.urlsafe_base64 #=> "b4GOKm4pOYU_-BOXcrUGDg" ;TI"@p SecureRandom.urlsafe_base64 #=> "UZLdOkzop70Ddx-IJR0ABg" ;TI" ;TI"Mp SecureRandom.urlsafe_base64(nil, true) #=> "i0XQ-7gglIsHGV2_BNPrdQ==" ;TI"Mp SecureRandom.urlsafe_base64(nil, true) #=> "-M8rLhr7JEpJlqFGUMmOxg==" ;T:@format0o; ; [I"9If secure random number generator is not available, ;TI"#NotImplementedError is raised.;T@o; ; [I"8See RFC 3548 for the definition of URL-safe base64.;T: @fileI"lib/securerandom.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(n=nil, padding=false);T@/FI"SecureRandom;FcRDoc::NormalModule00