From d3f1500bfaaf0c9ef4ddcd911757bf01b4e36344 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20B=C3=BCtow?= Date: Mon, 28 May 2018 10:32:12 +0100 Subject: can set iv --- geheim.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/geheim.rb b/geheim.rb index 40eecbd..ddb5ac5 100644 --- a/geheim.rb +++ b/geheim.rb @@ -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 -- cgit v1.2.3