1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-19 17:53:39 +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

@@ -23,7 +23,7 @@ export class WebCryptoFunctionService implements CryptoFunctionService {
password: string | Uint8Array,
salt: string | Uint8Array,
algorithm: "sha256" | "sha512",
iterations: number
iterations: number,
): Promise<Uint8Array> {
const wcLen = algorithm === "sha256" ? 256 : 512;
const passwordBuf = this.toBuf(password);
@@ -41,7 +41,7 @@ export class WebCryptoFunctionService implements CryptoFunctionService {
passwordBuf,
{ name: "PBKDF2" } as any,
false,
["deriveBits"]
["deriveBits"],
);
const buffer = await this.subtle.deriveBits(pbkdf2Params as any, impKey, wcLen);
return new Uint8Array(buffer);
@@ -52,7 +52,7 @@ export class WebCryptoFunctionService implements CryptoFunctionService {
salt: string | Uint8Array,
iterations: number,
memory: number,
parallelism: number
parallelism: number,
): Promise<Uint8Array> {
if (!this.wasmSupported) {
throw "Webassembly support is required for the Argon2 KDF feature.";
@@ -79,7 +79,7 @@ export class WebCryptoFunctionService implements CryptoFunctionService {
salt: string | Uint8Array,
info: string | Uint8Array,
outputByteSize: number,
algorithm: "sha256" | "sha512"
algorithm: "sha256" | "sha512",
): Promise<Uint8Array> {
const saltBuf = this.toBuf(salt);
const infoBuf = this.toBuf(info);
@@ -103,7 +103,7 @@ export class WebCryptoFunctionService implements CryptoFunctionService {
prk: Uint8Array,
info: string | Uint8Array,
outputByteSize: number,
algorithm: "sha256" | "sha512"
algorithm: "sha256" | "sha512",
): Promise<Uint8Array> {
const hashLen = algorithm === "sha256" ? 32 : 64;
if (outputByteSize > 255 * hashLen) {
@@ -136,7 +136,7 @@ export class WebCryptoFunctionService implements CryptoFunctionService {
async hash(
value: string | Uint8Array,
algorithm: "sha1" | "sha256" | "sha512" | "md5"
algorithm: "sha1" | "sha256" | "sha512" | "md5",
): Promise<Uint8Array> {
if (algorithm === "md5") {
const md = algorithm === "md5" ? forge.md.md5.create() : forge.md.sha1.create();
@@ -148,7 +148,7 @@ export class WebCryptoFunctionService implements CryptoFunctionService {
const valueBuf = this.toBuf(value);
const buffer = await this.subtle.digest(
{ name: this.toWebCryptoAlgorithm(algorithm) },
valueBuf
valueBuf,
);
return new Uint8Array(buffer);
}
@@ -156,7 +156,7 @@ export class WebCryptoFunctionService implements CryptoFunctionService {
async hmac(
value: Uint8Array,
key: Uint8Array,
algorithm: "sha1" | "sha256" | "sha512"
algorithm: "sha1" | "sha256" | "sha512",
): Promise<Uint8Array> {
const signingAlgorithm = {
name: "HMAC",
@@ -238,7 +238,7 @@ export class WebCryptoFunctionService implements CryptoFunctionService {
data: string,
iv: string,
mac: string,
key: SymmetricCryptoKey
key: SymmetricCryptoKey,
): DecryptParameters<string> {
const p = new DecryptParameters<string>();
if (key.meta != null) {
@@ -276,7 +276,7 @@ export class WebCryptoFunctionService implements CryptoFunctionService {
aesDecryptFast(parameters: DecryptParameters<string>, mode: "cbc" | "ecb"): Promise<string> {
const decipher = (forge as any).cipher.createDecipher(
this.toWebCryptoAesMode(mode),
parameters.encKey
parameters.encKey,
);
const options = {} as any;
if (mode === "cbc") {
@@ -294,7 +294,7 @@ export class WebCryptoFunctionService implements CryptoFunctionService {
data: Uint8Array,
iv: Uint8Array,
key: Uint8Array,
mode: "cbc" | "ecb"
mode: "cbc" | "ecb",
): Promise<Uint8Array> {
if (mode === "ecb") {
// Web crypto does not support AES-ECB mode, so we need to do this in forge.
@@ -314,7 +314,7 @@ export class WebCryptoFunctionService implements CryptoFunctionService {
async rsaEncrypt(
data: Uint8Array,
publicKey: Uint8Array,
algorithm: "sha1" | "sha256"
algorithm: "sha1" | "sha256",
): Promise<Uint8Array> {
// Note: Edge browser requires that we specify name and hash for both key import and decrypt.
// We cannot use the proper types here.
@@ -330,7 +330,7 @@ export class WebCryptoFunctionService implements CryptoFunctionService {
async rsaDecrypt(
data: Uint8Array,
privateKey: Uint8Array,
algorithm: "sha1" | "sha256"
algorithm: "sha1" | "sha256",
): Promise<Uint8Array> {
// Note: Edge browser requires that we specify name and hash for both key import and decrypt.
// We cannot use the proper types here.
@@ -440,7 +440,7 @@ export class WebCryptoFunctionService implements CryptoFunctionService {
try {
if (typeof WebAssembly === "object" && typeof WebAssembly.instantiate === "function") {
const module = new WebAssembly.Module(
Uint8Array.of(0x0, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00)
Uint8Array.of(0x0, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00),
);
if (module instanceof WebAssembly.Module) {
return new WebAssembly.Instance(module) instanceof WebAssembly.Instance;