forked from Yara724/api
19 lines
507 B
TypeScript
19 lines
507 B
TypeScript
import { ScryptOptions } from "node:crypto";
|
|
|
|
export const CURRENT_ALGORITHM = "scrypt";
|
|
export const CURRENT_VERSION = 1; // 0 = legacy salt:hash ; 1 = scrypt with different salt and hash and differnet format of salt:hash!
|
|
|
|
export const KEY_LENGTH = 64;
|
|
export const SCRYPT_PARAMS: ScryptOptions = {
|
|
N: 19456, // CPU/memory cost
|
|
r: 8, // block size
|
|
p: 1, // parallelization
|
|
};
|
|
|
|
export const KEY_LENGTH_FOR_OTP = 32;
|
|
export const SCRYPT_PARAMS_FOR_OTP: ScryptOptions = {
|
|
N: 1024,
|
|
r: 8,
|
|
p: 1,
|
|
};
|