mirror of
https://github.com/bitwarden/browser
synced 2025-12-21 10:43:35 +00:00
* Implement argon2 config * Remove argon2 webassembly warning * Replace magic numbers by enum * Implement kdf configuration * Update UI according to design feedback * Further updates to follow design feedback * Add oxford comma in argon2 description * Fix typos in argon2 descriptions * move key creation into promise with API call * change casing on PBKDF2 * general improvements * kdf config on set pin component * SHA-256 hash argon2 salt * Change argon2 defaults * Change argon2 salt hash to cryptoFunctionService * Fix isLowKdfIteration check --------- Co-authored-by: Kyle Spearrin <kyle.spearrin@gmail.com> Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com>
91 lines
2.9 KiB
TypeScript
91 lines
2.9 KiB
TypeScript
import { EmergencyAccessStatusType } from "../../enums/emergencyAccessStatusType";
|
|
import { EmergencyAccessType } from "../../enums/emergencyAccessType";
|
|
import { KdfType } from "../../enums/kdfType";
|
|
|
|
import { BaseResponse } from "./base.response";
|
|
import { CipherResponse } from "./cipher.response";
|
|
|
|
export class EmergencyAccessGranteeDetailsResponse extends BaseResponse {
|
|
id: string;
|
|
granteeId: string;
|
|
name: string;
|
|
email: string;
|
|
type: EmergencyAccessType;
|
|
status: EmergencyAccessStatusType;
|
|
waitTimeDays: number;
|
|
creationDate: string;
|
|
avatarColor: string;
|
|
|
|
constructor(response: any) {
|
|
super(response);
|
|
this.id = this.getResponseProperty("Id");
|
|
this.granteeId = this.getResponseProperty("GranteeId");
|
|
this.name = this.getResponseProperty("Name");
|
|
this.email = this.getResponseProperty("Email");
|
|
this.type = this.getResponseProperty("Type");
|
|
this.status = this.getResponseProperty("Status");
|
|
this.waitTimeDays = this.getResponseProperty("WaitTimeDays");
|
|
this.creationDate = this.getResponseProperty("CreationDate");
|
|
this.avatarColor = this.getResponseProperty("AvatarColor");
|
|
}
|
|
}
|
|
|
|
export class EmergencyAccessGrantorDetailsResponse extends BaseResponse {
|
|
id: string;
|
|
grantorId: string;
|
|
name: string;
|
|
email: string;
|
|
type: EmergencyAccessType;
|
|
status: EmergencyAccessStatusType;
|
|
waitTimeDays: number;
|
|
creationDate: string;
|
|
avatarColor: string;
|
|
|
|
constructor(response: any) {
|
|
super(response);
|
|
this.id = this.getResponseProperty("Id");
|
|
this.grantorId = this.getResponseProperty("GrantorId");
|
|
this.name = this.getResponseProperty("Name");
|
|
this.email = this.getResponseProperty("Email");
|
|
this.type = this.getResponseProperty("Type");
|
|
this.status = this.getResponseProperty("Status");
|
|
this.waitTimeDays = this.getResponseProperty("WaitTimeDays");
|
|
this.creationDate = this.getResponseProperty("CreationDate");
|
|
this.avatarColor = this.getResponseProperty("AvatarColor");
|
|
}
|
|
}
|
|
|
|
export class EmergencyAccessTakeoverResponse extends BaseResponse {
|
|
keyEncrypted: string;
|
|
kdf: KdfType;
|
|
kdfIterations: number;
|
|
kdfMemory?: number;
|
|
kdfParallelism?: number;
|
|
|
|
constructor(response: any) {
|
|
super(response);
|
|
|
|
this.keyEncrypted = this.getResponseProperty("KeyEncrypted");
|
|
this.kdf = this.getResponseProperty("Kdf");
|
|
this.kdfIterations = this.getResponseProperty("KdfIterations");
|
|
this.kdfMemory = this.getResponseProperty("KdfMemory");
|
|
this.kdfParallelism = this.getResponseProperty("KdfParallelism");
|
|
}
|
|
}
|
|
|
|
export class EmergencyAccessViewResponse extends BaseResponse {
|
|
keyEncrypted: string;
|
|
ciphers: CipherResponse[] = [];
|
|
|
|
constructor(response: any) {
|
|
super(response);
|
|
|
|
this.keyEncrypted = this.getResponseProperty("KeyEncrypted");
|
|
|
|
const ciphers = this.getResponseProperty("Ciphers");
|
|
if (ciphers != null) {
|
|
this.ciphers = ciphers.map((c: any) => new CipherResponse(c));
|
|
}
|
|
}
|
|
}
|