public enum ExchangeKeyEnum extends Enum<ExchangeKeyEnum>
Enum Constant and Description |
---|
RSA_AES
使用RSA进行密钥交换的通信过程加密
|
SM2_SM4
使用SM2进行密钥交换的通信过程加密
|
Modifier and Type | Method and Description |
---|---|
abstract cn.hutool.crypto.asymmetric.AbstractAsymmetricCrypto |
getAsymmetricCrypto()
获得非对称加密实例
|
abstract cn.hutool.crypto.asymmetric.AbstractAsymmetricCrypto |
getAsymmetricCrypto(String privateKeyBase64,
String publicKeyBase64)
获得非对称加密实例
|
abstract cn.hutool.crypto.symmetric.SymmetricCrypto |
getSymmetricCrypto(byte[] key)
获得对称加密实例
|
static ExchangeKeyEnum |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ExchangeKeyEnum[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ExchangeKeyEnum RSA_AES
使用RSA进行密钥交换的通信过程加密
使用AES作为最终交换密钥的加密算法
public static final ExchangeKeyEnum SM2_SM4
使用SM2进行密钥交换的通信过程加密
使用SM4作为最终交换密钥的加密算法
public static ExchangeKeyEnum[] values()
for (ExchangeKeyEnum c : ExchangeKeyEnum.values()) System.out.println(c);
public static ExchangeKeyEnum valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic abstract cn.hutool.crypto.asymmetric.AbstractAsymmetricCrypto getAsymmetricCrypto()
public abstract cn.hutool.crypto.asymmetric.AbstractAsymmetricCrypto getAsymmetricCrypto(String privateKeyBase64, String publicKeyBase64)
privateKeyBase64
- Base64私钥publicKeyBase64
- Base64公钥public abstract cn.hutool.crypto.symmetric.SymmetricCrypto getSymmetricCrypto(byte[] key)
Copyright © 2022 Pivotal Software, Inc.. All rights reserved.