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;