Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public GenerateSecretDerivedKey(sec: bls.SecretKey, idx: number) : bls.SecretKey {
// todo: implement key deriviation
const sec1 = bls.SecretKey();
sec1.setByCPRNG();
return sec1;
}
public NewSecretKeyFromSeed(hexStr: string) : bls.SecretKey {
const sec = bls.SecretKey();
const a = bls.fromHexStr(hexStr);
sec.setLittleEndian(a);
return sec;
}
public NewSecretKeyFromHex(hexStr: string) : bls.SecretKey {
const sec = bls.SecretKey();
sec.deserialize(hexStr);
return sec;
}