From 3909c5adb9e62404e39109590e454b964910ebab Mon Sep 17 00:00:00 2001 From: microshine Date: Thu, 28 Mar 2019 16:36:41 +0300 Subject: [PATCH] Add custom length test to HMAC generateKey --- test/hmac.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/test/hmac.ts b/test/hmac.ts index 1e5d465..56d6409 100644 --- a/test/hmac.ts +++ b/test/hmac.ts @@ -2,7 +2,7 @@ import { Convert } from "pvtsutils"; import { Crypto } from "../src"; import { ITestGenerateKeyAction, testCrypto } from "./helper"; -context.only("HMAC", () => { +context("HMAC", () => { const crypto = new Crypto(); @@ -32,6 +32,16 @@ context.only("HMAC", () => { keyUsages: ["sign", "verify"], } as ITestGenerateKeyAction; }), + { + name: "length:160", + algorithm: { + name: "HMAC", + hash: "SHA-256", + length: 160, + }, + extractable: true, + keyUsages: ["sign", "verify"], + } as ITestGenerateKeyAction, ], sign: [ {