[英]JavaFX Loading encrypted image file into ImageView
I have some encrypted image files with AES, i would like to load these images into image view in my gui. 我有一些使用AES加密的图像文件,我想将这些图像加载到GUI中的图像视图中。 However, i do not want them accessable without my gui, that decrypting them into different file is not solution for me because decrypted images can be taken while the gui is showing them.
但是,我不希望没有gui即可访问它们,将它们解密成其他文件对我来说不是解决方案,因为可以在gui显示它们的同时获取解密的图像。 What should I do?
我该怎么办?
Use CipherInputStream
to create a stream of deciphered image, then create a BufferedImage
from CipherInputStream
. 使用
CipherInputStream
创建解密的图像流,然后从CipherInputStream
创建一个BufferedImage
。 Add BufferedImage
to your image component. 将
BufferedImage
添加到您的图像组件。 If your key is larger than 128 bit you have to install jce. 如果密钥大于128位,则必须安装jce。
http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html
https://docs.oracle.com/javase/7/docs/api/javax/crypto/CipherInputStream.html https://docs.oracle.com/javase/7/docs/api/javax/crypto/CipherInputStream.html
How do I convert a InputStream to BufferedImage in Java/Groovy? 如何在Java / Groovy中将InputStream转换为BufferedImage?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.