mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-23 00:06:17 -04:00
23 lines
595 B
JavaScript
23 lines
595 B
JavaScript
/**
|
|
* OTP HOTP tests.
|
|
*
|
|
* @author bwhitn [brian.m.whitney@outlook.com]
|
|
*
|
|
* @copyright Crown Copyright 2017
|
|
* @license Apache-2.0
|
|
*/
|
|
import TestRegister from "../../lib/TestRegister.mjs";
|
|
|
|
TestRegister.addTests([
|
|
{
|
|
name: "Generate HOTP",
|
|
input: "JBSWY3DPEHPK3PXP",
|
|
expectedOutput: `URI: otpauth://hotp/?secret=JBSWY3DPEHPK3PXP&algorithm=SHA1&digits=6&counter=0\n\nPassword: 282760`,
|
|
recipeConfig: [
|
|
{
|
|
op: "Generate HOTP",
|
|
args: ["", 6, 0], // [Name, Code length, Counter]
|
|
},
|
|
],
|
|
},
|
|
]);
|