aes - Java使用对称加密算法加密大文件内存资源消耗问题
ringa_lee
ringa_lee 2017-04-18 10:40:05
0
1
725
ringa_lee
ringa_lee

ringa_lee

répondre à tous(1)
阿神

Utiliser CipherOutputStream

Cipher cipher = Cipher.getInstance("AES");
cipher.init(Cipher.ENCRYPT_MODE, key);

InputStream is = new FileInputStream(file);  
CipherOutputStream out = new CipherOutputStream(new FileOutputStream(dest), cipher)

IOUtils.copyLarge(is, out);
Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal