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 algorithmHkdfjava.security.NoSuchAlgorithmExceptionpublic 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.InvalidKeyExceptionpublic 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.ShortBufferExceptionCopyright © 2018 Amazon Web Services, Inc. All Rights Reserved.