Java源码示例:org.springframework.security.crypto.keygen.BytesKeyGenerator

示例1
public AESGCMBytesEncryptor(byte[] secretKey, BytesKeyGenerator ivGenerator) {
    this.secretKey = new KeyParameter(secretKey);
    this.ivGenerator = ivGenerator;
}
 
示例2
public AESGCMBytesEncryptor(String passphrase, KeyDerivationFunction keyDerivationFunction, CharSequence salt, BytesKeyGenerator ivGenerator) {
    this.secretKey = new KeyParameter(keyDerivationFunction.derive(passphrase, Hex.decode(salt), 32));
    this.ivGenerator = ivGenerator;
}