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-5-1 / 68.00元

人类历史上的历次技术革命,都带来了人类感知和认知能力的不断提升,从而使人类知道更多,做到更多,体验更多。以此为标准,李彦宏在本书中将人工智能定义为堪比任何一次技术革命的伟大变革,并且明确提出,在技术与人的关系上,智能革命不同于前几次技术革命,不是人去适应机器,而是机器主动来学习和适应人类,并同人类一起学习和创新这个世界。“人工智能”正式写入2017年政府工作报告,折射出未来人工智能产业在我国经济发......一起来看看 《智能革命》 这本书的介绍吧!

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具