I have to write an rexx program to encrpyt a sequential file. Using similar logic mentioned in the below code.
say 'The no to be encrypt is 1101:'
say 'The pwd to be embeded is 1001:'
say 'The encrypted value is:' c
say 'The decrypted value is:' d
I got the decrypted value as 1101. But when i get the character from user(using pull) after converting character to hex and hex to binary then i xor with pwd i am not able to decrypt the data. I am not getting the original input from decrption.
The below is the code.
Please let me know how to fix this issue. Also is it possible to encrypt a file using above logic.
Say 'Enter the word to be encrypted:'
Say 'Enter the pwd for encryption(1-8):'
Say 'encrypted word is:' encrypt
say 'decrpyted:' decrypt