Conceal 介绍
Conceal 是 Facebook 推出的一个用来对数据进行快速加密和认证的开发包,应用可以使用它来加密数据和大文件存储。Conceal
和其他加密软件不同的是它提供了
Smorgasbord
加密算法和选项,这不是一个一般意义上的数据加密包,只是提供一些有用的方法。
示例代码:
// Creates a new Crypto object with default implementations of // a key chain as well as native library. Crypto crypto = new Crypto( new SharedPrefsBackedKeyChain(context), new SystemNativeCryptoLibrary()); FileOutputStream fileStream = new FileOutputStream(file); // Creates an output stream which encrypts the data as // it is written to it and writes it out to the file. OutputStream outputStream = crypto.getCipherOutputStream( fileStream, entity); // Write plaintext to it. outputStream.write(plainText); outputStream.close();
Conceal 官网
https://facebook.github.io/conceal/
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。