mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-23 00:06:17 -04:00
Merge a0ade26505
into 7c8be12d52
This commit is contained in:
commit
02fe0d0717
6 changed files with 138 additions and 24 deletions
|
@ -580,10 +580,25 @@ Password: 282760`;
|
|||
assert.strictEqual(result.toString().substr(0, 37), "-----BEGIN PGP PRIVATE KEY BLOCK-----");
|
||||
}),
|
||||
|
||||
it("Generate UUID", () => {
|
||||
const result = chef.generateUUID();
|
||||
assert.ok(result.toString());
|
||||
assert.strictEqual(result.toString().length, 36);
|
||||
...[1, 3, 4, 5, 6, 7].map(version => it(`Generate UUID v${version}`, () => {
|
||||
const result = chef.generateUUID("", { "version": `v${version}` }).toString();
|
||||
assert.ok(result);
|
||||
assert.strictEqual(result.length, 36);
|
||||
})),
|
||||
|
||||
...[1, 3, 4, 5, 6, 7].map(version => it(`Analyze UUID v${version}`, () => {
|
||||
const uuid = chef.generateUUID("", { "version": `v${version}` }).toString();
|
||||
const result = chef.analyseUUID(uuid).toString();
|
||||
const expected = `UUID version: ${version}`;
|
||||
assert.strictEqual(result, expected);
|
||||
})),
|
||||
|
||||
it("Generate UUID using defaults", () => {
|
||||
const uuid = chef.generateUUID();
|
||||
assert.ok(uuid);
|
||||
|
||||
const analysis = chef.analyseUUID(uuid).toString();
|
||||
assert.strictEqual(analysis, "UUID version: 4");
|
||||
}),
|
||||
|
||||
it("Gzip, Gunzip", () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue