Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.appveyor.yml
.travis.yml
LICENSE
README.md
mod.ts
test.ts
test_vectors.json

README.md

sha1

Travis AppVeyor

SHA1 for deno.

⚠️ SHA1 is not recommended anymore. Do not use it for any new applications/codebases.

Usage

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

console.log('SHA1 of ""', sha1("", "utf8", "hex"))

API

new SHA1()

Creates a new SHA1 instance.

SHA1#init(): SHA1

Initializes a hash instance.

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

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

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

Obtain a digest of all the fed-in messages. outputEncoding can be one of "utf8", "hex", or "base64". If it is omitted a Uint8Array gets returned.

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

Convenience function for hashing singular data.

License

MIT

You can’t perform that action at this time.