mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-08 07:00:54 +03:00
remove browser dependency on "buffer"
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/* global AUTH_CONFIG */
|
||||
import { arrayToB64, b64ToArray } from './utils';
|
||||
import { arrayToB64, b64ToArray, concat } from './utils';
|
||||
|
||||
const encoder = new TextEncoder();
|
||||
const decoder = new TextDecoder();
|
||||
@@ -23,13 +23,6 @@ function getOtherInfo(enc) {
|
||||
return result;
|
||||
}
|
||||
|
||||
function concat(b1, b2) {
|
||||
const result = new Uint8Array(b1.length + b2.length);
|
||||
result.set(b1, 0);
|
||||
result.set(b2, b1.length);
|
||||
return result;
|
||||
}
|
||||
|
||||
async function concatKdf(key, enc) {
|
||||
if (key.length !== 32) {
|
||||
throw new Error('unsupported key length');
|
||||
|
||||
Reference in New Issue
Block a user