From f8b851a46e26ded1f9d39087d8b2d23841efaf65 Mon Sep 17 00:00:00 2001 From: Timo Hocker Date: Wed, 6 May 2020 07:55:22 +0200 Subject: [PATCH] fix --- .eslintignore | 2 ++ index.d.ts | 15 +++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 .eslintignore create mode 100644 index.d.ts diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..b3f0d2f --- /dev/null +++ b/.eslintignore @@ -0,0 +1,2 @@ +*.d.ts + diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..c3607e0 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,15 @@ +/** + * create an argon2 hash + * + * @param {string} plain plain text + * @returns {Promise} hash + */ +export function hash(plain: string): Promise; +/** + * verify a plain text against an argon2 hash + * + * @param {string} hash_str hash + * @param {string} plain plain text + * @returns {Promise} true if valid + */ +export function verify(hash_str: string, plain: string): Promise;