cipher和ciperoutputstream使用解密

ByteArrayOutputStream baos=new ByteArrayOutputStream();

cipher cipher=xxx;

CipherOutputStream ount=new CipherOutputStream(

out.write(bytedata,0,bytedata.length)

必须要out.close(),

才能用baos.tostring()

如果不关闭就tostring会有部分读取不出来

posted @ 2021-04-15 16:46  领悟.海洋  阅读(349)  评论(0编辑  收藏  举报