简体   繁体   中英

Encrypting plainText files and Decrypting them in Java with a Symmetric Key

I would like to encrypt a file using a symmetric key and decrypt it using the game key in java without losing data, I tried an encryption of a 56 byte file and the resultant file was 10 bytes which makes me think I'm going wrong somewhere.

Are there any tutorials on how to encrypt and decrypt files in java using a symmetric key? (and how to get said key?)

Here is a short nice tutorial: http://www.javamex.com/tutorials/cryptography/symmetric.shtml

Here is a related question: Java using AES 256 and 128 Symmetric-key encryption

Hope it'll help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM