Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
key(password: string): Uint8Array {
let sha512 = new sha("SHA-512", "TEXT");
sha512.update(password + AesService.SALT);
return new Uint8Array(sha512.getHash("ARRAYBUFFER")).slice(0,32);
}sha512(text: string): string {
let sha512 = new sha("SHA-512", "TEXT");
sha512.update(text + AesService.SALT);
return sha512.getHash("HEX");
}