openssl 加密解密 指令_openssl命令aes加密和解密

openssl命令aes加密和解密

日期:2014-11-12 10:41:25

最后更新日期:2017-07-06 10:00:10

【技术】

man openssl查看openssl的功能:

[code lang="cpp"]

o Creation and management of private keys, public keys and parameters

o Public key cryptographic operations

o Creation of X.509 certificates, CSRs and CRLs

o Calculation of Message Digests

o Encryption and Decryption with Ciphers

o SSL/TLS Client and Server Tests

o Handling of S/MIME signed or encrypted mail

o Time Stamp requests, generation and verification

[/code]

openssl工具功能如上诉,有些功能也是在实际工作中慢慢积累。最后两项功能,笔者就没有使用过。

1.openssl aes加密和解密

这里着重与openssl c api和python 的api能够相互转化。说白了都是同一套库。原始的aes加密和解密,key的长度与block大小一致。openssl库默认的aes加密方式如下:

[code lang="cpp"]

AES_KEY aeskey;

unsigned char userKey[16];

AES_set_encrypt_key

你可能感兴趣的:(openssl,加密解密,指令)