Class: Faker::Crypto

Inherits:
Base
  • Object
show all
Defined in:
lib/faker/crypto.rb

Constant Summary

Constants inherited from Base

Base::Letters, Base::Numbers, Base::ULetters

Class Method Summary collapse

Methods inherited from Base

bothify, fetch, fetch_all, flexible, letterify, method_missing, numerify, parse, rand, rand_in_range, regexify, sample, shuffle, translate, unique, with_locale

Class Method Details

.md5Object


6
7
8
# File 'lib/faker/crypto.rb', line 6

def md5
  Digest::MD5.hexdigest(Lorem.characters)
end

.sha1Object


10
11
12
# File 'lib/faker/crypto.rb', line 10

def sha1
  Digest::SHA1.hexdigest(Lorem.characters)
end

.sha256Object


14
15
16
# File 'lib/faker/crypto.rb', line 14

def sha256
  Digest::SHA256.hexdigest(Lorem.characters)
end