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)
创建
PBEKeySpec PBE算法没有密钥的概念,密钥在其它对称加密算法中是经过算法计算得出来的,PBE算法则是使用口令替代了密钥。 |
static PBEParameterSpec |
createPBEParameterSpec(byte[] salt,
int iterationCount)
|
public static KeySpec createKeySpec(String algorithm, byte[] key)
KeySpec
DESedeKeySpec
DESedeKeySpec
SecretKeySpec
algorithm
- 算法key
- 密钥KeySpec
public static PBEKeySpec createPBEKeySpec(char[] password)
PBEKeySpec
password
- 口令PBEKeySpec
public static PBEParameterSpec createPBEParameterSpec(byte[] salt, int iterationCount)
salt
- 加盐值iterationCount
- 摘要次数PBEParameterSpec
Copyright © 2025. All rights reserved.