Added 'Generate TOTP Code' operation

This commit is contained in:
hellodword 2022-01-08 22:42:56 +08:00
parent ae1b12c120
commit cbabfbaaa5
5 changed files with 127 additions and 0 deletions

View file

@ -0,0 +1,23 @@
/**
* Generate TOTP Code tests.
*
* @author hellodword
*
* @copyright Crown Copyright 2017
* @license Apache-2.0
*/
import TestRegister from "../../lib/TestRegister.mjs";
TestRegister.addTests([
{
name: "Generate TOTP Code",
input: "",
expectedOutput: "871328",
recipeConfig: [
{
op: "Generate TOTP Code",
args: ["KJLTAORSKZGV4RBMHNFDETRVKQUFMLZTHZYFOW2UFAYXIP23JVNQ", "SHA-1", 30, 6, 1465324707000],
},
],
},
]);