have "From Hex" treat the delimiter as delimiter, not what to erase

This commit is contained in:
MikeCAT 2022-11-03 00:21:20 +09:00
parent ed8bd34915
commit c046cf5695
2 changed files with 14 additions and 10 deletions

View file

@ -45,10 +45,10 @@ TestRegister.addApiTests([
const result = chef.ADD("sample input", {
key: {
string: "some key",
option: "Hex"
option: "utf8"
}
});
assert.equal(result.toString(), "aO[^ZS\u000eW\\^cb");
assert.equal(result.toString(), "\xe6\xd0\xda\xd5\x8c\xd0\x85\xe2\xe1\xdf\xe2\xd9");
}),
@ -121,10 +121,10 @@ Tiger-128`;
const result = chef.AND("Scot-free", {
key: {
string: "Raining Cats and Dogs",
option: "Hex",
option: "utf8",
}
});
assert.strictEqual(result.toString(), "\u0000\"M$(D E");
assert.strictEqual(result.toString(), "Raid)fb A");
}),
it("atBash Cipher", () => {
@ -371,10 +371,10 @@ color: white;
},
salt: {
string: "Market",
option: "Hex",
option: "utf8",
},
});
assert.strictEqual(result.toString(), "7c21a9f5063a4d62fb1050068245c181");
assert.strictEqual(result.toString(), "4930d5d200e80f18c96b5550d13c6af8");
}),
it("Derive PBKDF2 Key", () => {