public class SCrypt extends Object
Constructor and Description |
---|
SCrypt() |
Modifier and Type | Method and Description |
---|---|
static void |
blockmix_salsa8(byte[] BY,
int Bi,
int Yi,
int r) |
static void |
blockxor(byte[] S,
int Si,
byte[] D,
int Di,
int len) |
static int |
integerify(byte[] B,
int Bi,
int r) |
static int |
R(int a,
int b) |
static void |
salsa20_8(byte[] B) |
static byte[] |
scrypt(byte[] passwd,
byte[] salt,
int N,
int r,
int p,
int dkLen)
|
static byte[] |
scryptJ(byte[] passwd,
byte[] salt,
int N,
int r,
int p,
int dkLen)
|
static byte[] |
scryptN(byte[] passwd,
byte[] salt,
int N,
int r,
int p,
int dkLen)
|
static void |
smix(byte[] B,
int Bi,
int r,
int N,
byte[] V,
byte[] XY) |
public static byte[] scrypt(byte[] passwd, byte[] salt, int N, int r, int p, int dkLen) throws GeneralSecurityException
scryptN(byte[], byte[], int, int, int, int)
when the native library was successfully
loaded, otherwise calls scryptJ(byte[], byte[], int, int, int, int)
.passwd
- Password.salt
- Salt.N
- CPU cost parameter.r
- Memory cost parameter.p
- Parallelization parameter.dkLen
- Intended length of the derived key.GeneralSecurityException
- when HMAC_SHA256 is not available.public static byte[] scryptN(byte[] passwd, byte[] salt, int N, int r, int p, int dkLen)
passwd
- Password.salt
- Salt.N
- CPU cost parameter.r
- Memory cost parameter.p
- Parallelization parameter.dkLen
- Intended length of the derived key.public static byte[] scryptJ(byte[] passwd, byte[] salt, int N, int r, int p, int dkLen) throws GeneralSecurityException
passwd
- Password.salt
- Salt.N
- CPU cost parameter.r
- Memory cost parameter.p
- Parallelization parameter.dkLen
- Intended length of the derived key.GeneralSecurityException
- when HMAC_SHA256 is not available.public static void smix(byte[] B, int Bi, int r, int N, byte[] V, byte[] XY)
public static void blockmix_salsa8(byte[] BY, int Bi, int Yi, int r)
public static int R(int a, int b)
public static void salsa20_8(byte[] B)
public static void blockxor(byte[] S, int Si, byte[] D, int Di, int len)
public static int integerify(byte[] B, int Bi, int r)
Copyright © 2018. All rights reserved.