⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.133
Server IP:
185.119.109.197
Server:
Linux managedhosting.chostar.me 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
ri
/
3.0.0
/
system
/
SecureRandom
/
View File Name :
cdesc-SecureRandom.ri
U:RDoc::NormalModule[iI"SecureRandom:ET@0o:RDoc::Markup::Document:@parts[o;;[%S:RDoc::Markup::Heading: leveli: textI".Secure random number generator interface.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Paragraph;[I"OThis library is an interface to secure random number generators which are ;TI"?suitable for generating session keys in HTTP cookies, etc.;T@o; ;[I"BYou can use this library in your application by requiring it:;T@o:RDoc::Markup::Verbatim;[I"require 'securerandom' ;T:@format0o; ;[I"?It supports the following secure random number generators:;T@o:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0;[o; ;[I"openssl;To;;0;[o; ;[I"/dev/urandom;To;;0;[o; ;[I" Win32;T@o; ;[I"DSecureRandom is extended by the Random::Formatter module which ;TI"#defines the following methods:;T@o;;;;[o;;0;[o; ;[I"alphanumeric;To;;0;[o; ;[I"base64;To;;0;[o; ;[I"choose;To;;0;[o; ;[I"gen_random;To;;0;[o; ;[I"hex;To;;0;[o; ;[I" rand;To;;0;[o; ;[I"random_bytes;To;;0;[o; ;[I"random_number;To;;0;[o; ;[I"urlsafe_base64;To;;0;[o; ;[I" uuid;T@o; ;[I"GThese methods are usable as class methods of SecureRandom such as ;TI"`SecureRandom.hex`.;T@S; ; i;I" Examples;T@o; ;[I")Generate random hexadecimal strings:;T@o;;[ I"require 'securerandom' ;TI" ;TI"5SecureRandom.hex(10) #=> "52750b30ffbc7de3b362" ;TI"5SecureRandom.hex(10) #=> "92b15d6c8dc4beb5f559" ;TI";SecureRandom.hex(13) #=> "39b290146bea6ce975c37cfc23" ;T;0o; ;[I"$Generate random base64 strings:;T@o;;[I"4SecureRandom.base64(10) #=> "EcmTPZwWRAozdA==" ;TI"4SecureRandom.base64(10) #=> "KO1nIU+p9DKxGg==" ;TI"4SecureRandom.base64(12) #=> "7kJSM/MzBJI+75j8" ;T;0o; ;[I"$Generate random binary strings:;T@o;;[I"ASecureRandom.random_bytes(10) #=> "\016\t{\370g\310pbr\301" ;TI"GSecureRandom.random_bytes(10) #=> "\323U\030TO\234\357\020\a\337" ;T;0o; ;[I"#Generate alphanumeric strings:;T@o;;[I"4SecureRandom.alphanumeric(10) #=> "S8baxMJnPl" ;TI"4SecureRandom.alphanumeric(10) #=> "aOxAg8BAJe" ;T;0o; ;[I"Generate UUIDs:;T@o;;[I"BSecureRandom.uuid #=> "2d931510-d99f-494a-8c67-87feb05e1594" ;TI"ASecureRandom.uuid #=> "bad85eb9-0713-4da7-8d36-07a8e4b00eab";T;0: @fileI"lib/securerandom.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[ [ [ [[I" class;T[[:public[[I" bytes;TI"lib/securerandom.rb;T[I"gen_random;T@[:protected[ [:private[[I"gen_random_openssl;T@[I"gen_random_urandom;T@[I" instance;T[[;[ [;[ [;[ [ [U:RDoc::Context::Section[i 0o;;[ ;0;0[@@cRDoc::TopLevel