public final class Hkdf
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
byte[] |
deriveKey(byte[] info,
int length) |
void |
deriveKey(byte[] info,
int length,
byte[] output,
int offset) |
byte[] |
deriveKey(java.lang.String info,
int length) |
static Hkdf |
getInstance(java.lang.String algorithm)
Returns an new instance
|
void |
init(byte[] ikm) |
void |
init(byte[] ikm,
byte[] salt) |
void |
unsafeInitWithoutKeyExtraction(javax.crypto.SecretKey rawKey) |
public static Hkdf getInstance(java.lang.String algorithm) throws java.security.NoSuchAlgorithmException
algorithm
- the crypto algorithmHkdf
java.security.NoSuchAlgorithmException
public void init(byte[] ikm)
ikm
- REQUIRED: The input key material.public void init(byte[] ikm, byte[] salt)
ikm
- REQUIRED: The input key material.salt
- REQUIRED: Random bytes for salt.public void unsafeInitWithoutKeyExtraction(javax.crypto.SecretKey rawKey) throws java.security.InvalidKeyException
rawKey
- REQUIRED: Current secret key.java.security.InvalidKeyException
public byte[] deriveKey(java.lang.String info, int length)
info
- REQUIREDlength
- REQUIREDpublic byte[] deriveKey(byte[] info, int length)
info
- REQUIREDlength
- REQUIREDpublic void deriveKey(byte[] info, int length, byte[] output, int offset) throws javax.crypto.ShortBufferException
info
- REQUIREDlength
- REQUIREDoutput
- REQUIREDoffset
- REQUIREDjavax.crypto.ShortBufferException
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.