diff options
| author | Paul Bütow <pbuetow@mimecast.com> | 2018-05-28 10:32:12 +0100 |
|---|---|---|
| committer | Paul Bütow <pbuetow@mimecast.com> | 2018-05-28 10:32:12 +0100 |
| commit | d3f1500bfaaf0c9ef4ddcd911757bf01b4e36344 (patch) | |
| tree | 430e3de0ccb0b1b1f88e85f36c8fbdd1518ea78a | |
| parent | d8df43f387eaec2cb1d24e0abef87b8464e528c5 (diff) | |
can set iv
| -rw-r--r-- | geheim.rb | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -70,8 +70,12 @@ module Encryption super() if @@key.nil? @@key = File.read($key_file) - print "IV: " - input = $stdin.gets.chomp + if ENV['IV'] + input = ENV['IV'] + else + print "IV: " + input = $stdin.gets.chomp + end iv = input * 2 + "Hello world" + input * 2 @@iv = iv[0..15] end |
