fork download
  1. require 'openssl'
  2. require 'digest/sha1'
  3. encrypt
  4. # your pass is what is used to encrypt/decrypt
  5. key = key = Digest::SHA1.hexdigest("skroutz")
  6.  
  7. c = OpenSSL::Cipher::Cipher.new("aes-256-cbc")
  8. c.decrypt
  9. c.key = "P03N18212427F11V22H15E011016232629I081725R13A02T14Z09G07C1928O04061220W00L05"
  10. #c.iv = iv
  11. d = c.update(e)
  12. puts "decrypted: #{c.final}\n"
Runtime error #stdin #stdout #stderr 0.03s 10760KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
prog.rb:3:in `<main>': undefined local variable or method `encrypt' for main:Object (NameError)