mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2024-11-19 01:40:26 +01:00
PBKDF2SHA512: add JavaDoc comment to derive()
method
This commit is contained in:
parent
0d57e1ece1
commit
e67401d7a5
@ -45,6 +45,14 @@ public class PBKDF2SHA512 {
|
||||
// Length of HMAC result
|
||||
private static final int H_LEN = 64;
|
||||
|
||||
/**
|
||||
* Derive a key using PBKDF2-SHA512
|
||||
* @param P password
|
||||
* @param S salt
|
||||
* @param c iteration count, a positive integer
|
||||
* @param dkLen intended length in octets of the derived key, a positive integer
|
||||
* @return derived key
|
||||
*/
|
||||
public static byte[] derive(String P, String S, int c, int dkLen) {
|
||||
Preconditions.checkArgument(c > 0, () -> "count must be greater than zero");
|
||||
Preconditions.checkArgument(dkLen > 0, () -> "derived key length must be greater than zero");
|
||||
|
Loading…
Reference in New Issue
Block a user