enum SSLCipher extends Enum<SSLCipher>
| 枚举常量和说明 |
|---|
B_3DES |
B_AES_128 |
B_AES_128_GCM |
B_AES_128_GCM_IV |
B_AES_256 |
B_AES_256_GCM |
B_AES_256_GCM_IV |
B_DES |
B_DES_40 |
B_IDEA |
B_NULL |
B_RC2_40 |
B_RC4_128 |
B_RC4_40 |
B_SM4 |
B_SM4_GCM |
| 限定符和类型 | 字段和说明 |
|---|---|
(专用程序包) String |
algorithm |
(专用程序包) boolean |
allowed |
private static HashMap<String,Long> |
cipherLimits |
(专用程序包) CipherType |
cipherType |
(专用程序包) String |
description |
(专用程序包) int |
expandedKeySize |
(专用程序包) boolean |
exportable |
(专用程序包) int |
fixedIvSize |
private boolean |
isAvailable |
(专用程序包) int |
ivSize |
(专用程序包) int |
keySize |
private Map.Entry<SSLCipher.ReadCipherGenerator,ProtocolVersion[]>[] |
readCipherGenerators |
(专用程序包) static String[] |
tag |
(专用程序包) int |
tagSize |
(专用程序包) String |
transformation |
private Map.Entry<SSLCipher.WriteCipherGenerator,ProtocolVersion[]>[] |
writeCipherGenerators |
| 限定符和类型 | 方法和说明 |
|---|---|
private static void |
addMac(Authenticator.MAC signer,
ByteBuffer destination,
byte contentType) |
private static int |
addPadding(ByteBuffer bb,
int blockSize) |
private static int |
calculateRemainingLen(Authenticator.MAC signer,
int fullLen,
int usedLen) |
private static void |
checkCBCMac(Authenticator.MAC signer,
ByteBuffer bb,
byte contentType,
int cipheredLength,
byte[] sequence) |
private static boolean |
checkMacTags(byte contentType,
ByteBuffer bb,
Authenticator.MAC signer,
byte[] sequence,
boolean isSimulated) |
private static int[] |
checkPadding(ByteBuffer bb,
byte pad) |
private static void |
checkStreamMac(Authenticator.MAC signer,
ByteBuffer bb,
byte contentType,
byte[] sequence) |
private static int[] |
compareMacTags(ByteBuffer bb,
byte[] tag) |
(专用程序包) SSLCipher.SSLReadCipher |
createReadCipher(Authenticator authenticator,
ProtocolVersion protocolVersion,
SecretKey key,
IvParameterSpec iv,
SecureRandom random) |
(专用程序包) SSLCipher.SSLWriteCipher |
createWriteCipher(Authenticator authenticator,
ProtocolVersion protocolVersion,
SecretKey key,
IvParameterSpec iv,
SecureRandom random) |
(专用程序包) boolean |
isAvailable()
Test if this bulk cipher is available.
|
private static boolean |
isTransformationAvailable(String transformation) |
private static boolean |
isUnlimited(int keySize,
String transformation) |
private static int |
removePadding(ByteBuffer bb,
int tagLen,
int blockSize,
ProtocolVersion protocolVersion) |
String |
toString() |
static SSLCipher |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static SSLCipher[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final SSLCipher B_NULL
public static final SSLCipher B_RC4_40
public static final SSLCipher B_RC2_40
public static final SSLCipher B_DES_40
public static final SSLCipher B_RC4_128
public static final SSLCipher B_DES
public static final SSLCipher B_3DES
public static final SSLCipher B_IDEA
public static final SSLCipher B_AES_128
public static final SSLCipher B_AES_256
public static final SSLCipher B_AES_128_GCM
public static final SSLCipher B_AES_256_GCM
public static final SSLCipher B_AES_128_GCM_IV
public static final SSLCipher B_AES_256_GCM_IV
public static final SSLCipher B_SM4
public static final SSLCipher B_SM4_GCM
final String description
final String transformation
final String algorithm
final boolean allowed
final int keySize
final int expandedKeySize
final int ivSize
final int fixedIvSize
final boolean exportable
final CipherType cipherType
final int tagSize
private final boolean isAvailable
private final Map.Entry<SSLCipher.ReadCipherGenerator,ProtocolVersion[]>[] readCipherGenerators
private final Map.Entry<SSLCipher.WriteCipherGenerator,ProtocolVersion[]>[] writeCipherGenerators
static final String[] tag
public static SSLCipher[] values()
for (SSLCipher c : SSLCipher.values()) System.out.println(c);
public static SSLCipher valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值private static boolean isTransformationAvailable(String transformation)
SSLCipher.SSLReadCipher createReadCipher(Authenticator authenticator, ProtocolVersion protocolVersion, SecretKey key, IvParameterSpec iv, SecureRandom random) throws GeneralSecurityException
SSLCipher.SSLWriteCipher createWriteCipher(Authenticator authenticator, ProtocolVersion protocolVersion, SecretKey key, IvParameterSpec iv, SecureRandom random) throws GeneralSecurityException
boolean isAvailable()
private static boolean isUnlimited(int keySize,
String transformation)
private static void addMac(Authenticator.MAC signer, ByteBuffer destination, byte contentType)
private static void checkStreamMac(Authenticator.MAC signer, ByteBuffer bb, byte contentType, byte[] sequence) throws BadPaddingException
private static void checkCBCMac(Authenticator.MAC signer, ByteBuffer bb, byte contentType, int cipheredLength, byte[] sequence) throws BadPaddingException
private static boolean checkMacTags(byte contentType,
ByteBuffer bb,
Authenticator.MAC signer,
byte[] sequence,
boolean isSimulated)
private static int[] compareMacTags(ByteBuffer bb, byte[] tag)
private static int calculateRemainingLen(Authenticator.MAC signer, int fullLen, int usedLen)
private static int addPadding(ByteBuffer bb, int blockSize)
private static int removePadding(ByteBuffer bb, int tagLen, int blockSize, ProtocolVersion protocolVersion) throws BadPaddingException
private static int[] checkPadding(ByteBuffer bb, byte pad)
Copyright © 2023. All rights reserved.