Skip to content

Commit

Permalink
Add support for Dell E7A8 generator
Browse files Browse the repository at this point in the history
  • Loading branch information
bacher09 committed Dec 15, 2021
1 parent 6a67b69 commit ee5f3a8
Show file tree
Hide file tree
Showing 10 changed files with 674 additions and 497 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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``, ``1F66``, ``1F5A`` and ``BF97``. *e.g*: ``1234567-2A7B`` or ``1234567890A-D35B`` for HDD.
* Dell — supports such series: ``595B``, ``D35B``, ``2A7B``, ``A95B``, ``1D3B``, ``6FF1``, ``1F66``, ``1F5A`` and ``BF97``, ``E7A8``. *e.g*: ``1234567-2A7B`` or ``1234567890A-D35B`` for HDD.
* Dell Insyde BIOS (Latitude 3540) — *e.g.* ``5F3988D5E0ACE4BF-7QH8602`` (``7QH8602`` — service tag).
* Fujitsu-Siemens — 5 decimal digits, 8 hexadecimal digits, 5x4 hexadecimal digits, 5x4 decimal digits
* Hewlett-Packard — 5 decimal digits, 10 characters
Expand Down
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = function(config) {
base: "SauceLabs",
browserName: 'MicrosoftEdge',
platform: 'Windows 10',
version: '13.10586'
version: '18.17763'
},
ChromeHeadlessTravis: {
base: "ChromeHeadless",
Expand Down
43 changes: 43 additions & 0 deletions src/keygen/cryptoUtils.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { AES128, Crc64, Sha256 } from "./cryptoUtils";

describe("Crypto utils", () => {
it("sha256", () => {
expect(new Sha256(Uint8Array.from([])).hexdigest())
.toEqual("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855");

expect(new Sha256(Uint8Array.from([1])).hexdigest())
.toEqual("4bf5122f344554c53bde2ebb8cd2b7e3d1600ad631c385a5d7cce23c7785459a");

expect(new Sha256(Uint8Array.from([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])).hexdigest())
.toEqual("c848e1013f9f04a9d63fa43ce7fd4af035152c7c669a4a404b67107cee5f2e4e");

expect(new Sha256(Uint8Array.from("test".split("").map((v) => v.charCodeAt(0)))).hexdigest())
.toEqual("9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08");

expect(new Sha256(Uint8Array.from("0".repeat(256).split("").map((v) => v.charCodeAt(0)))).hexdigest())
.toEqual("67f022195ee405142968ca1b53ae2513a8bab0404d70577785316fa95218e8ba");

expect(new Sha256(Uint8Array.from("0".repeat(56).split("").map((v) => v.charCodeAt(0)))).hexdigest())
.toEqual("bd03ac1428f0ea86f4b83a731ffc7967bb82866d8545322f888d2f6e857ffc18");
});
it("AES128", () => {
const numbers = Uint8Array.from([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]);
const myaes = new AES128(numbers);
expect(myaes.encryptBlock(numbers))
.toEqual(Uint8Array.from([52, 195, 59, 127, 20, 253, 83, 220, 234, 37, 224, 26, 2, 225, 103, 39]));

expect(myaes.encryptBlock(Uint8Array.from("123456789abcdefg".split("").map((v) => v.charCodeAt(0)))))
.toEqual(Uint8Array.from([111, 52, 225, 193, 98, 40, 19, 168, 122, 34, 93, 3, 146, 166, 202, 100]));
});
it("crc64", () => {
let mycrc = new Crc64(Crc64.ECMA_POLYNOMIAL);
mycrc.update([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]);
expect(mycrc.hexdigest()).toEqual("335a089168033fbe");
mycrc.reset();
mycrc.update([0x80]);
expect(mycrc.hexdigest()).toEqual("c96c5795d7870f42");
mycrc.reset();
mycrc.update(Uint8Array.from([0xde, 0xad, 0xbe, 0xef]));
expect(mycrc.hexdigest()).toEqual("fc232c18806871af");
});
});
Loading

0 comments on commit ee5f3a8

Please sign in to comment.