deleted ecb mode (unsafe) and wrote IV to final file
changes key length depending on algo
bug fix