post the contents of "ciphertext.txt" here, and hopefully I can demonstrate what I'm talking about
Well i wrote a short paragraph, compiled and ran the program, here is the output of my ciphertext.txt file.
unfortunately the decrypt did not want to work, i tried several times differently, i dont know if i am missing something but every time the key length error came up so i could not test that.
Strangely the first time i ran it the decrypt executed but the out file just looked like another key, then it would not work again after that. if its my usage thats at fault go ahead with the sample cipher below, or let me know what you think i doing wrong and i will go again.

5D4CDBEA850DB5CF3EFC2C9885D38C99DBC7B55BF3645BF145 30696F63C332AEDC603DBA26C8F8D2776628186D5044713AA1 BB9EE38131547D62E77E74BEC25746EE388F2E1C4594762C5D 90EA152CA9C32660862B3013A40AA751DB5E5ED34D984AFEF1 85FB6DBFC3B9ED6ADC00F82D44EF12A1FBA09DF4DD84BDA535 C608A3CB66B7105EBAEB14E28C36250D8B01FD0EB8B676E9F3 651D1F83729EE126240367A58658403FB2AB676A471CFB7595 A7B1EABAC53B1250BB5D5695A7AAA7F8482BB2E31992B17844 91AF904E0CF5EF216D3E3C6CB113EFDF186E7F724847E17371 13F9AE0C31A9C3E0470B608C32056AF91D7AB1735D0E0FBC83 222BBE331B1F9E73D477D9C641FD179726