How to use the jssha/src/sha.js function in jssha

To help you get started, we’ve selected a few jssha examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SSilence / markdownnotes / projects / markdown-app / src / app / shared / aes.service.ts View on Github external
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);
    }
github SSilence / markdownnotes / projects / markdown-app / src / app / shared / aes.service.ts View on Github external
sha512(text: string): string {
        let sha512 = new sha("SHA-512", "TEXT");
        sha512.update(text + AesService.SALT);
        return sha512.getHash("HEX");
    }

jssha

jsSHA implements the complete Secure Hash Standard (SHA) family (SHA-1, SHA-224/256/384/512, SHA3-224/256/384/512, SHAKE128/256, cSHAKE128/256, and KMAC128/256) with HMAC

BSD-3-Clause
Latest version published 12 months ago

Package Health Score

77 / 100
Full package analysis

Popular jssha functions