mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 06:55:08 -04:00
tests: fix tests
This commit is contained in:
parent
b560d74b8e
commit
75991321de
2 changed files with 11 additions and 11 deletions
|
@ -574,14 +574,14 @@ Top Drawer`, {
|
||||||
assert.strictEqual(chef.fromUNIXTimestamp("978346800").toString(), "Mon 1 January 2001 11:00:00 UTC");
|
assert.strictEqual(chef.fromUNIXTimestamp("978346800").toString(), "Mon 1 January 2001 11:00:00 UTC");
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// it("Generate HOTP", () => {
|
it("Generate HOTP", () => {
|
||||||
// const result = chef.generateHOTP("JBSWY3DPEHPK3PXP", {
|
const result = chef.generateHOTP("JBSWY3DPEHPK3PXP", {
|
||||||
// });
|
});
|
||||||
// const expected = `URI: otpauth://hotp/?secret=JBSWY3DPEHPK3PXP&algorithm=SHA1&digits=6&counter=0
|
const expected = `URI: otpauth://hotp/?secret=JBSWY3DPEHPK3PXP&algorithm=SHA1&digits=6&counter=0
|
||||||
|
|
||||||
// Password: 282760`;
|
Password: 282760`;
|
||||||
// assert.strictEqual(result.toString(), expected);
|
assert.strictEqual(result.toString(), expected);
|
||||||
// }),
|
}),
|
||||||
|
|
||||||
it("Generate PGP Key Pair", async () => {
|
it("Generate PGP Key Pair", async () => {
|
||||||
const result = await chef.generatePGPKeyPair("Back To the Drawing Board", {
|
const result = await chef.generatePGPKeyPair("Back To the Drawing Board", {
|
||||||
|
|
|
@ -11,12 +11,12 @@ import TestRegister from "../../lib/TestRegister.mjs";
|
||||||
TestRegister.addTests([
|
TestRegister.addTests([
|
||||||
{
|
{
|
||||||
name: "Generate HOTP",
|
name: "Generate HOTP",
|
||||||
input: "12345678901234567890",
|
input: "JBSWY3DPEHPK3PXP",
|
||||||
expectedOutput: "URI: otpauth://hotp/OTPAuthentication?secret=GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ\n\nPassword: 755224",
|
expectedOutput: `URI: otpauth://hotp/?secret=JBSWY3DPEHPK3PXP&algorithm=SHA1&digits=6&counter=0\n\nPassword: 282760`,
|
||||||
recipeConfig: [
|
recipeConfig: [
|
||||||
{
|
{
|
||||||
op: "Generate HOTP",
|
op: "Generate HOTP",
|
||||||
args: ["", 32, 6, 0],
|
args: ["", 6, 0], // [Name, Code length, Counter]
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue