public class SpecUtil extends Object
KeySpec: 密钥规范AlgorithmParameterSpec: 参数规范| Constructor and Description |
|---|
SpecUtil() |
| Modifier and Type | Method and Description |
|---|---|
static KeySpec |
createKeySpec(String algorithm,
byte[] key)
|
static PBEKeySpec |
createPBEKeySpec(char[] password)
创建
PBEKeySpecPBE算法没有密钥的概念,密钥在其它对称加密算法中是经过算法计算得出来的,PBE算法则是使用口令替代了密钥。 |
static PBEParameterSpec |
createPBEParameterSpec(byte[] salt,
int iterationCount)
|
public static KeySpec createKeySpec(String algorithm, byte[] key)
KeySpec
DESedeKeySpecDESedeKeySpecSecretKeySpecalgorithm - 算法key - 密钥KeySpecpublic static PBEKeySpec createPBEKeySpec(char[] password)
PBEKeySpecpassword - 口令PBEKeySpecpublic static PBEParameterSpec createPBEParameterSpec(byte[] salt, int iterationCount)
salt - 加盐值iterationCount - 摘要次数PBEParameterSpecCopyright © 2025. All rights reserved.