1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 09:13:33 +00:00

Assign ownership to many libs files (#6928)

Assign ownership to many of the remaining libs/common files.

Criteria for ownership:
* Files used by a single team, is now owned by that team.
* Files related to a domain owned by a team is now owned by that team.
* Where ownership is unclear the "lowest level" service takes ownership.
This commit is contained in:
Oscar Hinton
2023-11-27 21:59:44 +01:00
committed by GitHub
parent 31ca3ea7b0
commit a5e3432f85
336 changed files with 446 additions and 473 deletions

View File

@@ -0,0 +1,34 @@
export enum EncryptionType {
AesCbc256_B64 = 0,
AesCbc128_HmacSha256_B64 = 1,
AesCbc256_HmacSha256_B64 = 2,
Rsa2048_OaepSha256_B64 = 3,
Rsa2048_OaepSha1_B64 = 4,
Rsa2048_OaepSha256_HmacSha256_B64 = 5,
Rsa2048_OaepSha1_HmacSha256_B64 = 6,
}
/** The expected number of parts to a serialized EncString of the given encryption type.
* For example, an EncString of type AesCbc256_B64 will have 2 parts, and an EncString of type
* AesCbc128_HmacSha256_B64 will have 3 parts.
*
* Example of annotated serialized EncStrings:
* 0.iv|data
* 1.iv|data|mac
* 2.iv|data|mac
* 3.data
* 4.data
*
* @see EncString
* @see EncryptionType
* @see EncString.parseEncryptedString
*/
export const EXPECTED_NUM_PARTS_BY_ENCRYPTION_TYPE = {
[EncryptionType.AesCbc256_B64]: 2,
[EncryptionType.AesCbc128_HmacSha256_B64]: 3,
[EncryptionType.AesCbc256_HmacSha256_B64]: 3,
[EncryptionType.Rsa2048_OaepSha256_B64]: 1,
[EncryptionType.Rsa2048_OaepSha1_B64]: 1,
[EncryptionType.Rsa2048_OaepSha256_HmacSha256_B64]: 2,
[EncryptionType.Rsa2048_OaepSha1_HmacSha256_B64]: 2,
};

View File

@@ -0,0 +1,4 @@
export enum FileUploadType {
Direct = 0,
Azure = 1,
}

View File

@@ -0,0 +1,4 @@
export enum HashPurpose {
ServerAuthorization = 1,
LocalAuthorization = 2,
}

View File

@@ -0,0 +1,5 @@
export enum HtmlStorageLocation {
Local = "local",
Memory = "memory",
Session = "session",
}

View File

@@ -0,0 +1,9 @@
export * from "./encryption-type.enum";
export * from "./file-upload-type.enum";
export * from "./hash-purpose.enum";
export * from "./html-storage-location.enum";
export * from "./kdf-type.enum";
export * from "./key-suffix-options.enum";
export * from "./log-level-type.enum";
export * from "./storage-location.enum";
export * from "./theme-type.enum";

View File

@@ -0,0 +1,14 @@
import { KdfConfig } from "../../auth/models/domain/kdf-config";
export enum KdfType {
PBKDF2_SHA256 = 0,
Argon2id = 1,
}
export const DEFAULT_ARGON2_MEMORY = 64;
export const DEFAULT_ARGON2_PARALLELISM = 4;
export const DEFAULT_ARGON2_ITERATIONS = 3;
export const DEFAULT_KDF_TYPE = KdfType.PBKDF2_SHA256;
export const DEFAULT_PBKDF2_ITERATIONS = 600000;
export const DEFAULT_KDF_CONFIG = new KdfConfig(DEFAULT_PBKDF2_ITERATIONS);

View File

@@ -0,0 +1,5 @@
export enum KeySuffixOptions {
Auto = "auto",
Biometric = "biometric",
Pin = "pin",
}

View File

@@ -0,0 +1,6 @@
export enum LogLevelType {
Debug,
Info,
Warning,
Error,
}

View File

@@ -0,0 +1,5 @@
export enum StorageLocation {
Both = "both",
Disk = "disk",
Memory = "memory",
}

View File

@@ -0,0 +1,7 @@
export enum ThemeType {
System = "system",
Light = "light",
Dark = "dark",
Nord = "nord",
SolarizedDark = "solarizedDark",
}