1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-19 01:33:33 +00:00

[deps] Autofill: Update prettier to v3 (#7014)

* [deps] Autofill: Update prettier to v3

* prettier formatting updates

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Prusik <jprusik@classynemesis.com>
This commit is contained in:
renovate[bot]
2023-11-29 16:15:20 -05:00
committed by GitHub
parent 4ff5f38e89
commit 28de9439be
1145 changed files with 5898 additions and 5612 deletions

View File

@@ -82,7 +82,7 @@ describe("NodeCrypto Function Service", () => {
prk32Byte,
64,
"BnIqJlfnHm0e/2iB/15cbHyR19ARPIcWRp4oNS22CD9BV+" +
"/queOZenPNkDhmlVyL2WZ3OSU5+7ISNF5NhNfvZA=="
"/queOZenPNkDhmlVyL2WZ3OSU5+7ISNF5NhNfvZA==",
);
testHkdfExpand("sha512", prk64Byte, 32, "uLWbMWodSBms5uGJ5WTRTesyW+MD7nlpCZvagvIRXlk=");
testHkdfExpand(
@@ -90,7 +90,7 @@ describe("NodeCrypto Function Service", () => {
prk64Byte,
64,
"uLWbMWodSBms5uGJ5WTRTesyW+MD7nlpCZvagvIRXlkY5Pv0sB+" +
"MqvaopmkC6sD/j89zDwTV9Ib2fpucUydO8w=="
"MqvaopmkC6sD/j89zDwTV9Ib2fpucUydO8w==",
);
it("should fail with prk too small", async () => {
@@ -99,7 +99,7 @@ describe("NodeCrypto Function Service", () => {
Utils.fromB64ToArray(prk16Byte),
"info",
32,
"sha256"
"sha256",
);
await expect(f).rejects.toEqual(new Error("prk is too small."));
});
@@ -110,7 +110,7 @@ describe("NodeCrypto Function Service", () => {
Utils.fromB64ToArray(prk32Byte),
"info",
8161,
"sha256"
"sha256",
);
await expect(f).rejects.toEqual(new Error("outputByteSize is too large."));
});
@@ -252,7 +252,7 @@ describe("NodeCrypto Function Service", () => {
"A1/p8BQzN9UrbdYxUY2Va5+kPLyfZXF9JsZrjeEXcaclsnHurdxVAJcnbEqYMP3UXV" +
"4YAS/mpf+Rxe6/X0WS1boQdA0MAHSgx95hIlAraZYpiMLLiJRKeo2u8YivCdTM9V5vuAEJwf9Tof/qFsFci3sApdbATkorCT" +
"zFOIEPF2S1zgperEP23M01mr4dWVdYN18B32YF67xdJHMbFhp5dkQwv9CmscoWq7OE5HIfOb+JAh7BEZb+CmKhM3yWJvoR/D" +
"/5jcercUtK2o+XrzNrL4UQ7yLZcFz6Bfwb/j6ICYvqd/YJwXNE6dwlL57OfwJyCdw2rRYf0/qI00t9u8Iitw=="
"/5jcercUtK2o+XrzNrL4UQ7yLZcFz6Bfwb/j6ICYvqd/YJwXNE6dwlL57OfwJyCdw2rRYf0/qI00t9u8Iitw==",
);
const decValue = await nodeCryptoFunctionService.rsaDecrypt(data, privKey, "sha1");
expect(Utils.fromBufferToUtf8(decValue)).toBe("EncryptMe!");
@@ -289,7 +289,7 @@ describe("NodeCrypto Function Service", () => {
const randomData = await nodeCryptoFunctionService.randomBytes(16);
const randomData2 = await nodeCryptoFunctionService.randomBytes(16);
expect(
randomData.byteLength === randomData2.byteLength && randomData !== randomData2
randomData.byteLength === randomData2.byteLength && randomData !== randomData2,
).toBeTruthy();
});
});
@@ -308,7 +308,7 @@ function testPbkdf2(
algorithm: "sha256" | "sha512",
regularKey: string,
utf8Key: string,
unicodeKey: string
unicodeKey: string,
) {
const regularEmail = "user@example.com";
const utf8Email = "üser@example.com";
@@ -341,7 +341,7 @@ function testPbkdf2(
Utils.fromUtf8ToArray(regularPassword),
Utils.fromUtf8ToArray(regularEmail),
algorithm,
5000
5000,
);
expect(Utils.fromBufferToB64(key)).toBe(regularKey);
});
@@ -351,7 +351,7 @@ function testHkdf(
algorithm: "sha256" | "sha512",
regularKey: string,
utf8Key: string,
unicodeKey: string
unicodeKey: string,
) {
const ikm = Utils.fromB64ToArray("criAmKtfzxanbgea5/kelQ==");
@@ -388,7 +388,7 @@ function testHkdf(
Utils.fromUtf8ToArray(regularSalt),
Utils.fromUtf8ToArray(regularInfo),
32,
algorithm
algorithm,
);
expect(Utils.fromBufferToB64(key)).toBe(regularKey);
});
@@ -398,7 +398,7 @@ function testHkdfExpand(
algorithm: "sha256" | "sha512",
b64prk: string,
outputByteSize: number,
b64ExpectedOkm: string
b64ExpectedOkm: string,
) {
const info = "info";
@@ -408,7 +408,7 @@ function testHkdfExpand(
Utils.fromB64ToArray(b64prk),
info,
outputByteSize,
algorithm
algorithm,
);
expect(Utils.fromBufferToB64(okm)).toBe(b64ExpectedOkm);
});
@@ -418,7 +418,7 @@ function testHash(
algorithm: "sha1" | "sha256" | "sha512" | "md5",
regularHash: string,
utf8Hash: string,
unicodeHash: string
unicodeHash: string,
) {
const regularValue = "HashMe!!";
const utf8Value = "HǻshMe!!";
@@ -514,7 +514,7 @@ function testRsaGenerateKeyPair(length: 1024 | 2048 | 4096) {
const publicKey = await cryptoFunctionService.rsaExtractPublicKey(keyPair[1]);
expect(Utils.fromBufferToB64(keyPair[0])).toBe(Utils.fromBufferToB64(publicKey));
},
30000
30000,
);
}