1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-26 21:23:34 +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

@@ -14,7 +14,7 @@ export class NodeCryptoFunctionService implements CryptoFunctionService {
password: string | Uint8Array,
salt: string | Uint8Array,
algorithm: "sha256" | "sha512",
iterations: number
iterations: number,
): Promise<Uint8Array> {
const len = algorithm === "sha256" ? 32 : 64;
const nodePassword = this.toNodeValue(password);
@@ -35,7 +35,7 @@ export class NodeCryptoFunctionService implements CryptoFunctionService {
salt: string | Uint8Array,
iterations: number,
memory: number,
parallelism: number
parallelism: number,
): Promise<Uint8Array> {
const nodePassword = this.toNodeValue(password);
const nodeSalt = this.toNodeBuffer(this.toUint8Buffer(salt));
@@ -58,7 +58,7 @@ export class NodeCryptoFunctionService implements CryptoFunctionService {
salt: string | Uint8Array,
info: string | Uint8Array,
outputByteSize: number,
algorithm: "sha256" | "sha512"
algorithm: "sha256" | "sha512",
): Promise<Uint8Array> {
const saltBuf = this.toUint8Buffer(salt);
const prk = await this.hmac(ikm, saltBuf, algorithm);
@@ -70,7 +70,7 @@ export class NodeCryptoFunctionService 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) {
@@ -103,7 +103,7 @@ export class NodeCryptoFunctionService implements CryptoFunctionService {
hash(
value: string | Uint8Array,
algorithm: "sha1" | "sha256" | "sha512" | "md5"
algorithm: "sha1" | "sha256" | "sha512" | "md5",
): Promise<Uint8Array> {
const nodeValue = this.toNodeValue(value);
const hash = crypto.createHash(algorithm);
@@ -114,7 +114,7 @@ export class NodeCryptoFunctionService implements CryptoFunctionService {
hmac(
value: Uint8Array,
key: Uint8Array,
algorithm: "sha1" | "sha256" | "sha512"
algorithm: "sha1" | "sha256" | "sha512",
): Promise<Uint8Array> {
const nodeValue = this.toNodeBuffer(value);
const nodeKey = this.toNodeBuffer(key);
@@ -145,7 +145,7 @@ export class NodeCryptoFunctionService implements CryptoFunctionService {
hmacFast(
value: Uint8Array,
key: Uint8Array,
algorithm: "sha1" | "sha256" | "sha512"
algorithm: "sha1" | "sha256" | "sha512",
): Promise<Uint8Array> {
return this.hmac(value, key, algorithm);
}
@@ -167,7 +167,7 @@ export class NodeCryptoFunctionService implements CryptoFunctionService {
data: string,
iv: string,
mac: string,
key: SymmetricCryptoKey
key: SymmetricCryptoKey,
): DecryptParameters<Uint8Array> {
const p = new DecryptParameters<Uint8Array>();
p.encKey = key.encKey;
@@ -191,7 +191,7 @@ export class NodeCryptoFunctionService implements CryptoFunctionService {
async aesDecryptFast(
parameters: DecryptParameters<Uint8Array>,
mode: "cbc" | "ecb"
mode: "cbc" | "ecb",
): Promise<string> {
const decBuf = await this.aesDecrypt(parameters.data, parameters.iv, parameters.encKey, mode);
return Utils.fromBufferToUtf8(decBuf);
@@ -201,7 +201,7 @@ export class NodeCryptoFunctionService implements CryptoFunctionService {
data: Uint8Array,
iv: Uint8Array,
key: Uint8Array,
mode: "cbc" | "ecb"
mode: "cbc" | "ecb",
): Promise<Uint8Array> {
const nodeData = this.toNodeBuffer(data);
const nodeIv = mode === "ecb" ? null : this.toNodeBuffer(iv);
@@ -214,7 +214,7 @@ export class NodeCryptoFunctionService implements CryptoFunctionService {
rsaEncrypt(
data: Uint8Array,
publicKey: Uint8Array,
algorithm: "sha1" | "sha256"
algorithm: "sha1" | "sha256",
): Promise<Uint8Array> {
if (algorithm === "sha256") {
throw new Error("Node crypto does not support RSA-OAEP SHA-256");
@@ -228,7 +228,7 @@ export class NodeCryptoFunctionService implements CryptoFunctionService {
rsaDecrypt(
data: Uint8Array,
privateKey: Uint8Array,
algorithm: "sha1" | "sha256"
algorithm: "sha1" | "sha256",
): Promise<Uint8Array> {
if (algorithm === "sha256") {
throw new Error("Node crypto does not support RSA-OAEP SHA-256");
@@ -274,7 +274,7 @@ export class NodeCryptoFunctionService implements CryptoFunctionService {
const privateKey = Utils.fromByteStringToArray(privateKeyByteString);
resolve([publicKey, privateKey]);
}
},
);
});
}