Please I need some assistance with a simple code to Enncrypt and Decrypt 26letters of the Alphabet( A to Z) contained in a file called "SecretFile".
Example: File SecretFile contains: ABCDEFGHIJKLMNOPQRSTUVWXYZ.
I really don't know where to start:
so far I have:
Any help will be greatly appreciated.Code:import java.??????? // what base class do I import for this operation? imoport java.io.*; public class Encryptor implements OutputStream { private OutputStream mOutput; public Encryptor(OutputStream); Char Encrypt(char ch) { if ch > 'A' && ch < 'z') { int val = (int) ch; int Aval = (int)'A'; val = (val - Aval + 1)%26 Aval; return (Char) val; } } } class Decryptor exends Encryptor { I guess I should do the reverse in the above process???????
GiftX.




Reply With Quote