You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

17 rivejä
507 B

  1. import { stringToArrayBuffer, arrayBufferToHex, getAlgorithm } from ".";
  2. test("stringToArrayBuffer", () => {
  3. expect(stringToArrayBuffer("ȧ")[0]).toBe(200);
  4. expect(stringToArrayBuffer("ȧ")[1]).toBe(167);
  5. });
  6. test("arrayBufferToHex", () => {
  7. expect(arrayBufferToHex(new Uint8Array([200, 167]))).toBe("c8a7");
  8. });
  9. test("getAlgorithm", () => {
  10. expect(getAlgorithm("sha-256")).toBe("SHA-256");
  11. expect(getAlgorithm("sha256")).toBe("SHA-256");
  12. expect(getAlgorithm("ShA-256")).toBe("SHA-256");
  13. });