Class: Trocla::Formats::Sha1

Inherits:
Base
  • Object
show all
Defined in:
lib/trocla/formats/sha1.rb

Instance Attribute Summary

Attributes inherited from Base

#trocla

Instance Method Summary collapse

Methods inherited from Base

expensive, #expensive?, expensive?, #initialize, #render

Constructor Details

This class inherits a constructor from Trocla::Formats::Base

Instance Method Details

#format(plain_password, options = {}) ⇒ Object



4
5
6
# File 'lib/trocla/formats/sha1.rb', line 4

def format(plain_password, options = {})
  '{SHA}' + Base64.encode64(Digest::SHA1.digest(plain_password))
end