Add custom length test to HMAC generateKey

This commit is contained in:
microshine 2019-03-28 16:36:41 +03:00
parent 4e6994c0be
commit 3909c5adb9
1 changed files with 11 additions and 1 deletions

View File

@ -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: [
{