Apache Commons Crypto

码农软件 · 软件分类 · 加密/解密软件包 · 2019-09-30 16:12:55

软件介绍

Apache Commons Crypto 是一个加密库,使用 AES-NI (Advanced Encryption Standard New Instructions) 进行优化。提供了加密级别和流级别的 API。开发者可以使用最少代码来实现高性能的 AES 加解密应用。

Maven:

<dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-crypto</artifactId>
    <version>1.0.0</version>
</dependency>

示例代码:

Properties properties = new Properties();
//Creates a CryptoCipher instance with the transformation and properties.
CryptoCipher cipher = Utils.getCipherInstance(CipherTransformation.AES_CTR_NOPADDING, properties);

String input = "hello world!";
int inputOffset = 0;
int inputLen = input.length();
byte[] output = new byte[1024];
int outputOffset = 0;
//Initializes the cipher with ENCRYPT_MODE, key and iv.
cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key,"AES"), new IvParameterSpec(iv));
//Continues a multiple-part encryption/decryption operation for byte array.
cipher.update(input.getBytes("UTF-8"), inputOffset, inputLen, output, outputOffset);
//We should call do final at the end of encryption/decryption.
cipher.doFinal(inBuffer, outBuffer);
//Closes the cipher.
cipher.close();

本文地址:https://www.codercto.com/soft/d/15741.html

个体崛起

个体崛起

水木然 / 2017-8-1 / 49.00

互联网时代,社会的组织结构发生着巨变,个体经济将开始大放异彩,未来社会经济的基本单元不再是企业,而是个体。 在这种变化中,如何围绕核心竞争力来构建商业模式,在市场上取得独特地位?每个人的核心竞争力是什么?本书围绕经济战略布局、个体发展规划的生存模式予以分析与梳理,同时把个人命运与国家命脉紧密联系在一起,充满正能量,旨在给读者以反思与启示。一起来看看 《个体崛起》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

在线进制转换器
在线进制转换器

各进制数互转换器

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码