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:
@@ -15,7 +15,7 @@ export class EncryptServiceImplementation implements EncryptService {
|
||||
constructor(
|
||||
protected cryptoFunctionService: CryptoFunctionService,
|
||||
protected logService: LogService,
|
||||
protected logMacFailures: boolean
|
||||
protected logMacFailures: boolean,
|
||||
) {}
|
||||
|
||||
async encrypt(plainValue: string | Uint8Array, key: SymmetricCryptoKey): Promise<EncString> {
|
||||
@@ -84,13 +84,13 @@ export class EncryptServiceImplementation implements EncryptService {
|
||||
encString.data,
|
||||
encString.iv,
|
||||
encString.mac,
|
||||
key
|
||||
key,
|
||||
);
|
||||
if (fastParams.macKey != null && fastParams.mac != null) {
|
||||
const computedMac = await this.cryptoFunctionService.hmacFast(
|
||||
fastParams.macData,
|
||||
fastParams.macKey,
|
||||
"sha256"
|
||||
"sha256",
|
||||
);
|
||||
const macsEqual = await this.cryptoFunctionService.compareFast(fastParams.mac, computedMac);
|
||||
if (!macsEqual) {
|
||||
@@ -141,7 +141,7 @@ export class EncryptServiceImplementation implements EncryptService {
|
||||
encThing.dataBytes,
|
||||
encThing.ivBytes,
|
||||
key.encKey,
|
||||
"cbc"
|
||||
"cbc",
|
||||
);
|
||||
|
||||
return result ?? null;
|
||||
@@ -149,7 +149,7 @@ export class EncryptServiceImplementation implements EncryptService {
|
||||
|
||||
async decryptItems<T extends InitializerMetadata>(
|
||||
items: Decryptable<T>[],
|
||||
key: SymmetricCryptoKey
|
||||
key: SymmetricCryptoKey,
|
||||
): Promise<T[]> {
|
||||
if (items == null || items.length < 1) {
|
||||
return [];
|
||||
|
||||
@@ -16,7 +16,7 @@ const classInitializers: Record<InitializerKey, (obj: any) => any> = {
|
||||
};
|
||||
|
||||
export function getClassInitializer<T extends InitializerMetadata>(
|
||||
className: InitializerKey
|
||||
className: InitializerKey,
|
||||
): (obj: Jsonify<T>) => T {
|
||||
return classInitializers[className];
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ export class MultithreadEncryptServiceImplementation extends EncryptServiceImple
|
||||
*/
|
||||
async decryptItems<T extends InitializerMetadata>(
|
||||
items: Decryptable<T>[],
|
||||
key: SymmetricCryptoKey
|
||||
key: SymmetricCryptoKey,
|
||||
): Promise<T[]> {
|
||||
if (items == null || items.length < 1) {
|
||||
return [];
|
||||
@@ -36,8 +36,8 @@ export class MultithreadEncryptServiceImplementation extends EncryptServiceImple
|
||||
new URL(
|
||||
/* webpackChunkName: 'encrypt-worker' */
|
||||
"@bitwarden/common/platform/services/cryptography/encrypt.worker.ts",
|
||||
import.meta.url
|
||||
)
|
||||
import.meta.url,
|
||||
),
|
||||
);
|
||||
|
||||
this.restartTimeout();
|
||||
@@ -58,11 +58,11 @@ export class MultithreadEncryptServiceImplementation extends EncryptServiceImple
|
||||
items.map((jsonItem: Jsonify<T>) => {
|
||||
const initializer = getClassInitializer<T>(jsonItem.initializerKey);
|
||||
return initializer(jsonItem);
|
||||
})
|
||||
}),
|
||||
),
|
||||
takeUntil(this.clear$),
|
||||
defaultIfEmpty([])
|
||||
)
|
||||
defaultIfEmpty([]),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user