public class PBKDF extends Object
Constructor and Description |
---|
PBKDF() |
Modifier and Type | Method and Description |
---|---|
static void |
pbkdf2(Mac mac,
byte[] S,
int c,
byte[] DK,
int dkLen)
Implementation of PBKDF2 (RFC2898).
|
static byte[] |
pbkdf2(String alg,
byte[] P,
byte[] S,
int c,
int dkLen)
Implementation of PBKDF2 (RFC2898).
|
public static byte[] pbkdf2(String alg, byte[] P, byte[] S, int c, int dkLen) throws GeneralSecurityException
alg
- HMAC algorithm to use.P
- Password.S
- Salt.c
- Iteration count.dkLen
- Intended length, in octets, of the derived key.GeneralSecurityException
public static void pbkdf2(Mac mac, byte[] S, int c, byte[] DK, int dkLen) throws GeneralSecurityException
mac
- Pre-initialized Mac
instance to use.S
- Salt.c
- Iteration count.DK
- Byte array that derived key will be placed in.dkLen
- Intended length, in octets, of the derived key.GeneralSecurityException
Copyright © 2016. All rights reserved.