import { Keygrip } from "https://deno.land/x/keygrip@v2.0.0/mod.ts";
Creates a class for storing private keys in a keychain to easily hash and verify data with different keys
Constructors
new
Keygrip(keys: string[], algo?: Algorithm)Methods
private
compare(a: string, b: string): booleanTiming safe compare using Brad Hill's Double HMAC pattern
index(data: string, digest: string): number
Resolve the index of which key was used to digest specified data.
verify(data: string, digest: string): boolean
Verifies if the data matches the digest with any of the keys in the keychain.