Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
1.00/5 (6 votes)
See more:
English Version:

Problems:
File encryption and decryption
 
■ instructions and rules:
(1) Please implement a file encryption and decryption program files.
(2) Enter a password key (one character), as the encryption key and this key, the encrypted file is written the first character position on the use of this decryption key to decrypt it.
(3) The encryption method is carried out for each character XOR the key blank is also needed.
 
■ examples show:
> Encryption (1) or decrypt (2): 1 Enter
> Enter the path to the file you want to encrypt: C: \ \ File \ \ Data \ \ Hw4.txt Enter
> Enter the key you want to use: A Enter
> Encryption is complete, press any key to continue ... Enter
 
> Encryption (1) or decrypt (2): 2 Enter
> Enter the path to the file you want to decrypt: C: \ \ File \ \ Data \ \ Hw4.txt Enter
> Decryption is complete, press any key to continue ... Enter

VB
Problems:
檔案加解密

■說明與規則:
(1)請實作一檔案加密與檔案解密程式。
(2)請輸入一個密碼鑰匙(一個字元),當成加密金鑰,並將此金鑰,寫入加密後檔案的第一個字元位置,解密就使用此金鑰進行解密。
(3)加密方法為對每一個字元進行與金鑰做 XOR運算,空白也需要。

■範例展示:
>加密(1)或解密(2):1 Enter
>請輸入要加密之檔案路徑:C:\\File\\Data\\Hw4.txt Enter
>請輸入要使用之金鑰:A Enter
>加密完成,請按任何鍵繼續... Enter

>加密(1)或解密(2):2 Enter
>請輸入要解密之檔案路徑:C:\\File\\Data\\Hw4.txt Enter
>解密完成,請按任何鍵繼續... Enter
Posted
Updated 20-Jun-13 6:23am
v2
Comments
[no name] 20-Jun-13 12:45pm    
We do not do homework for people here.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900