Help Center/ IoT/ Developer Guide/ Product Development/ Developing a Codec/ Reference/ Appendix: Encryption Algorithms Supported by the JDK
Updated on 2022-02-24 GMT+08:00

Appendix: Encryption Algorithms Supported by the JDK

Digest Algorithm

Algorithm Name

Algorithm

Hash Length

Remarks

MD

MD2

128

-

MD5

128

-

SHA

SHA-1

160

-

SHA-256

256

-

SHA-384

384

-

SHA-512

512

-

HMAC

HmacMD5

128

-

HmacSHA1

160

-

HmacSHA256

256

-

HmacSHA384

384

-

HmacSHA512

512

-

Symmetric Encryption Algorithm

Algorithm Name

Key Length

Default Length

Work Mode

Padding Mode

Remarks

DES

56

56

ECB, CBC, PCBC, CTR, CTS, CFB, CFB8 to 128, OFB, and OFB8 to 128

NoPadding, PKCS5Padding, and ISO10126Padding

-

3DES

112 or 168

168

ECB, CBC, PCBC, CTR, CTS, CFB, CFB8 to 128, OFB, and OFB8 to 128

NoPadding, PKCS5Padding, and ISO10126Padding

-

AES

128, 192, or 256

128

ECB, CBC, PCBC, CTR, CTS, CFB, CFB8 to 128, OFB, and OFB8 to 128

NoPadding, PKCS5Padding, and ISO10126Padding

The 256-bit key needs to obtain the permission file without policy restriction.

Asymmetric Encryption Algorithm

Algorithm Name

Key Length

Default Length

Work Mode

Padding Mode

Remarks

DH

512-1024 (a multiple of 64)

1024

N/A

N/A

-

Base64 is also supported by the JDK.