[Pkg-javascript-commits] [node-keygrip] 14/68: updated README with .index

Andrew Kelley andrewrk-guest at moszumanska.debian.org
Fri Jun 27 22:13:24 UTC 2014


This is an automated email from the git hooks/post-receive script.

andrewrk-guest pushed a commit to branch master
in repository node-keygrip.

commit e6c3de360e884530981504636e704de63bcd25cc
Author: Jed Schmidt <tr at nslator.jp>
Date:   Fri Feb 25 23:46:13 2011 +0900

    updated README with .index
---
 README.md | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index eeea468..d501fde 100644
--- a/README.md
+++ b/README.md
@@ -35,12 +35,16 @@ Keygrip keeps a reference to this array to automatically reflect any changes. Th
 
 This creates a SHA1 HMAC based on the _first_ key in the keylist, and outputs it as a 27-byte url-safe base64 digest (base64 without padding, replacing `+` with `-` and `/` with `_`).
 
-### keys.verify( data, digest )
+### keys.index( data, digest )
 
 This loops through all of the keys currently in the keylist until the digest of the current key matches the given digest, at which point the current index is returned. If no key is matched, `-1` is returned.
 
 The idea is that if the index returned is greater than `0`, the data should be re-signed to prevent premature credential invalidation, and enable better performance for subsequent challenges.
 
+### keys.verify( data, digest )
+
+This uses `index` to return `true` if the digest matches any existing keys, and `false` otherwise.
+
 ## Example
 
     // ./test.js

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-keygrip.git



More information about the Pkg-javascript-commits mailing list