mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-25 21:51:30 +01:00
no aliasing
This commit is contained in:
parent
24e5378c97
commit
b7a0fbfef5
@ -1,9 +1,9 @@
|
||||
export { AttachmentData as Attachment } from './attachmentData';
|
||||
export { CardData as Card } from './cardData';
|
||||
export { CipherData as Cipher } from './cipherData';
|
||||
export { CollectionData as Collection } from './collectionData';
|
||||
export { FieldData as Field } from './fieldData';
|
||||
export { FolderData as Folder } from './folderData';
|
||||
export { IdentityData as Identity } from './identityData';
|
||||
export { LoginData as Login } from './loginData';
|
||||
export { SecureNoteData as SecureNote } from './secureNoteData';
|
||||
export { AttachmentData } from './attachmentData';
|
||||
export { CardData } from './cardData';
|
||||
export { CipherData } from './cipherData';
|
||||
export { CollectionData } from './collectionData';
|
||||
export { FieldData } from './fieldData';
|
||||
export { FolderData } from './folderData';
|
||||
export { IdentityData } from './identityData';
|
||||
export { LoginData } from './loginData';
|
||||
export { SecureNoteData } from './secureNoteData';
|
||||
|
@ -1,5 +1,3 @@
|
||||
import * as forge from 'node-forge';
|
||||
|
||||
import { EncryptionType } from '../../enums/encryptionType';
|
||||
|
||||
import { SymmetricCryptoKeyBuffers } from './symmetricCryptoKeyBuffers';
|
||||
@ -13,17 +11,20 @@ export class SymmetricCryptoKey {
|
||||
macKey: string;
|
||||
encType: EncryptionType;
|
||||
keyBuf: SymmetricCryptoKeyBuffers;
|
||||
forge: any;
|
||||
|
||||
constructor(keyBytes: string, b64KeyBytes?: boolean, encType?: EncryptionType) {
|
||||
this.forge = (window as any).forge;
|
||||
|
||||
if (b64KeyBytes) {
|
||||
keyBytes = forge.util.decode64(keyBytes);
|
||||
keyBytes = this.forge.util.decode64(keyBytes);
|
||||
}
|
||||
|
||||
if (!keyBytes) {
|
||||
throw new Error('Must provide keyBytes');
|
||||
}
|
||||
|
||||
const buffer = (forge as any).util.createBuffer(keyBytes);
|
||||
const buffer = this.forge.util.createBuffer(keyBytes);
|
||||
if (!buffer || buffer.length() === 0) {
|
||||
throw new Error('Couldn\'t make buffer');
|
||||
}
|
||||
@ -41,7 +42,7 @@ export class SymmetricCryptoKey {
|
||||
}
|
||||
|
||||
this.key = keyBytes;
|
||||
this.keyB64 = forge.util.encode64(keyBytes);
|
||||
this.keyB64 = this.forge.util.encode64(keyBytes);
|
||||
this.encType = encType;
|
||||
|
||||
if (encType === EncryptionType.AesCbc256_B64 && bufferLength === 32) {
|
||||
|
@ -1,8 +1,8 @@
|
||||
export { CipherRequest as Cipher } from './cipherRequest';
|
||||
export { DeviceRequest as Device } from './deviceRequest';
|
||||
export { DeviceTokenRequest as DeviceToken } from './deviceTokenRequest';
|
||||
export { FolderRequest as Folder } from './folderRequest';
|
||||
export { PasswordHintRequest as PasswordHint } from './passwordHintRequest';
|
||||
export { RegisterRequest as Register } from './registerRequest';
|
||||
export { TokenRequest as Token } from './tokenRequest';
|
||||
export { TwoFactorEmailRequest as TwoFactorEmail } from './twoFactorEmailRequest';
|
||||
export { CipherRequest } from './cipherRequest';
|
||||
export { DeviceRequest } from './deviceRequest';
|
||||
export { DeviceTokenRequest } from './deviceTokenRequest';
|
||||
export { FolderRequest } from './folderRequest';
|
||||
export { PasswordHintRequest } from './passwordHintRequest';
|
||||
export { RegisterRequest } from './registerRequest';
|
||||
export { TokenRequest } from './tokenRequest';
|
||||
export { TwoFactorEmailRequest } from './twoFactorEmailRequest';
|
||||
|
@ -1,14 +1,14 @@
|
||||
export { AttachmentResponse as Attachment } from './attachmentResponse';
|
||||
export { CipherResponse as Cipher } from './cipherResponse';
|
||||
export { CollectionResponse as Collection } from './collectionResponse';
|
||||
export { DeviceResponse as Device } from './deviceResponse';
|
||||
export { DomainsResponse as Domains } from './domainsResponse';
|
||||
export { ErrorResponse as Error } from './errorResponse';
|
||||
export { FolderResponse as Folder } from './folderResponse';
|
||||
export { GlobalDomainResponse as GlobalDomain } from './globalDomainResponse';
|
||||
export { IdentityTokenResponse as IdentityToken } from './identityTokenResponse';
|
||||
export { KeysResponse as Keys } from './keysResponse';
|
||||
export { ListResponse as List } from './listResponse';
|
||||
export { ProfileOrganizationResponse as ProfileOrganization } from './profileOrganizationResponse';
|
||||
export { ProfileResponse as Profile } from './profileResponse';
|
||||
export { SyncResponse as Sync } from './syncResponse';
|
||||
export { AttachmentResponse } from './attachmentResponse';
|
||||
export { CipherResponse } from './cipherResponse';
|
||||
export { CollectionResponse } from './collectionResponse';
|
||||
export { DeviceResponse } from './deviceResponse';
|
||||
export { DomainsResponse } from './domainsResponse';
|
||||
export { ErrorResponse } from './errorResponse';
|
||||
export { FolderResponse } from './folderResponse';
|
||||
export { GlobalDomainResponse } from './globalDomainResponse';
|
||||
export { IdentityTokenResponse } from './identityTokenResponse';
|
||||
export { KeysResponse } from './keysResponse';
|
||||
export { ListResponse } from './listResponse';
|
||||
export { ProfileOrganizationResponse } from './profileOrganizationResponse';
|
||||
export { ProfileResponse } from './profileResponse';
|
||||
export { SyncResponse } from './syncResponse';
|
||||
|
Loading…
Reference in New Issue
Block a user