mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 14:23:32 +00:00
[EC-271] Refactor CryptoService - move symmetric encryption to EncryptService (#3042)
* move decryptFromBytes, decryptToBytes, and encryptToBytes from CryptoService to EncryptService * leave redirects in CryptoService * combine encryptService decryptFromBytes and decryptToBytes methods * move parsing logic into EncArrayBuffer * add tests
This commit is contained in:
@@ -28,10 +28,10 @@ export function mockEnc(s: string): EncString {
|
||||
return mock;
|
||||
}
|
||||
|
||||
export function makeStaticByteArray(length: number) {
|
||||
export function makeStaticByteArray(length: number, start = 0) {
|
||||
const arr = new Uint8Array(length);
|
||||
for (let i = 0; i < length; i++) {
|
||||
arr[i] = i;
|
||||
arr[i] = start + i;
|
||||
}
|
||||
return arr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user