diff options
| author | Paul Buetow <paul@mimecast.com> | 2018-05-27 22:10:38 +0100 |
|---|---|---|
| committer | Paul Buetow <paul@mimecast.com> | 2018-05-27 22:10:38 +0100 |
| commit | d8df43f387eaec2cb1d24e0abef87b8464e528c5 (patch) | |
| tree | 65b38a750c825f37e371a4bd51975011849becb4 | |
| parent | 2ae97604c1a8e4afcf9b84b19a2c87b8bf058a6e (diff) | |
ensure iv is 16b
| -rw-r--r-- | geheim.rb | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -71,7 +71,9 @@ module Encryption if @@key.nil? @@key = File.read($key_file) print "IV: " - @@iv = @@key[-1] + $stdin.gets.chomp * 10 + @@key[0] + input = $stdin.gets.chomp + iv = input * 2 + "Hello world" + input * 2 + @@iv = iv[0..15] end end |
