开发者

How to encrypt a file in java using AES [duplicate]

开发者 https://www.devze.com 2023-02-17 00:46 出处:网络
This question already has answers here: Java 256-bit AES Password-Based Encryption (9 answers) Closed 9 years ago.
This question already has answers here: Java 256-bit AES Password-Based Encryption (9 answers) Closed 9 years ago. 开发者_如何学Python

I need to know how to create an AES and using it to encrypt and decrypt a file in java.


Try using a CipherOutputStream and passing in a FileOutputStream. See http://www.java2s.com/Tutorial/Java/0490__Security/UsingCipherOutputStream.htm for a quick example, just use Cipher.getInstance("AES/CBC/PKCS5Padding") instead.

0

精彩评论

暂无评论...
验证码 换一张
取 消