mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-08 07:00:54 +03:00
fixing small issues
This commit is contained in:
@@ -4,7 +4,6 @@ const { hexToArray } = require('./utils');
|
||||
class FileReceiver extends EventEmitter {
|
||||
constructor() {
|
||||
super();
|
||||
this.salt = hexToArray(location.pathname.slice(10, -1));
|
||||
}
|
||||
|
||||
download() {
|
||||
@@ -37,7 +36,7 @@ class FileReceiver extends EventEmitter {
|
||||
data: this.result,
|
||||
aad: meta.aad,
|
||||
filename: meta.filename,
|
||||
iv: meta.iv
|
||||
iv: meta.id
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -72,8 +72,7 @@ class FileSender extends EventEmitter {
|
||||
},
|
||||
secretKey,
|
||||
file.plaintext
|
||||
)
|
||||
.catch(err => console.log('Error with encrypting.')),
|
||||
),
|
||||
window.crypto.subtle.exportKey('jwk', secretKey),
|
||||
new Promise((resolve, reject) => { resolve(file.hash) })
|
||||
]);
|
||||
@@ -114,7 +113,7 @@ class FileSender extends EventEmitter {
|
||||
'X-File-Metadata',
|
||||
JSON.stringify({
|
||||
aad: arrayToHex(hash),
|
||||
iv: fileId,
|
||||
id: fileId,
|
||||
filename: file.name
|
||||
})
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user