Add tests for Dell HDD 1F5A

This commit is contained in:
Slava Bacherikov 2019-08-28 18:43:00 +03:00
parent 6df4577e3a
commit 8259b6241c
2 changed files with 14 additions and 2 deletions

View file

@ -14,7 +14,7 @@ Latest released version available [here][bios-pw] and latest testing version (*s
* Asus — current BIOS date. For example: ``01-02-2013``
* Compaq — 5 decimal digits (*e.g*. ``12345``)
* Dell — supports such series: ``595B``, ``D35B``, ``2A7B``, ``A95B``, ``1D3B``, ``6FF1`` and ``1F66``. *e.g*: ``1234567-2A7B`` or ``1234567890A-D35B`` for HDD.
* Dell — supports such series: ``595B``, ``D35B``, ``2A7B``, ``A95B``, ``1D3B``, ``6FF1``, ``1F66`` and ``1F5A``. *e.g*: ``1234567-2A7B`` or ``1234567890A-D35B`` for HDD.
* Fujitsu-Siemens — 5 decimal digits, 8 hexadecimal digits, 5x4 hexadecimal digits, 5x4 decimal digits
* Hewlett-Packard — 5 decimal digits, 10 characters
* Insyde H20 (Acer, HP) — 8 decimal digits

View file

@ -97,6 +97,11 @@ describe("Test calculateSuffix", () => {
let suffix = checkSuffix("12345678901", DellTag.Tag1F66, SuffixType.HDD);
expect(suffix).toEqual([48, 114, 79, 71, 55, 48, 49, 83]);
});
it("Check hdd suffix for: 12345678901-1F5A", () => {
let suffix = checkSuffix("12345678901", DellTag.Tag1F5A, SuffixType.HDD);
expect(suffix).toEqual([48, 51, 113, 98, 107, 48, 99, 115]);
});
});
describe("Test keygenDell", () => {
@ -200,7 +205,14 @@ describe("Test keygenDell", () => {
expect(keygenDell("1234567890A", DellTag.Tag6FF1, SuffixType.HDD))
.toEqual("5enLLpM3Immfb8CK");
});
// TODO: add HDD 1F5A
it("Dell HDD password for: 1234567890A-1F5A", () => {
expect(keygenDell("1234567890A", DellTag.Tag1F5A, SuffixType.HDD))
.toEqual("L9IJjYoUIXeY5wOy");
});
it("Dell HDD password for: 12345678901-1F5A", () => {
expect(keygenDell("12345678901", DellTag.Tag1F5A, SuffixType.HDD))
.toEqual("QwO5Dki1zeR1n1t2");
});
});
describe("Test Dell BIOS", () => {