Class: H::Generator

Inherits:
Object
  • Object
show all
Defined in:
lib/h.rb

Instance Method Summary collapse

Instance Method Details

#input(m, l = 44) ⇒ Object



17
18
19
20
21
# File 'lib/h.rb', line 17

def input(m, l = 44)
  m = m + ENV.fetch('STATIC_KEY')
  d = cryptographic_hash(m)
  truncate d, l
end

#promptObject



13
14
15
# File 'lib/h.rb', line 13

def prompt
  input ask('Message: ') {|q| q.echo = '*' }
end