Skip to content

chiefbiiko/sha512

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sha512

ci

SHA2-512 for deno.

Usage

import { sha512 } from "https://denopkg.com/chiefbiiko/sha512/mod.ts";

console.log('SHA2-512 of ""', sha512("", "utf8", "hex"))

API

new SHA512()

Creates a new SHA2-512 instance.

SHA512#init(): SHA512

Initializes a hash instance.

SHA512#update(msg: string | Uint8Array, inputEncoding?: string): SHA512

Updates a hash with additional data. inputEncoding can be one of "utf8", "hex", or "base64".

SHA512#digest(outputEncoding?: string): string | Uint8Array

Get a hash digest. outputEncoding can be one of "utf8", "hex", or "base64". If it is omitted a Uint8Array is returned.

sha512(msg: string | Uint8Array, inputEncoding?: string, outputEncoding?: string): string | Uint8Array

Convenience function for hashing singular data.

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published