Skip to content

Commit

Permalink
#314 subtle.encrypt returns an ArrayBuffer, we want a Uint8Array..
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Oct 3, 2024
1 parent be9797f commit 4395971
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion html5/js/Protocol.js
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ class XpraProtocol {
if (this.cipher_out_key) {
//console("encrypting", packet[0], "packet using", JSON.stringify(this.cipher_out_params), ":", bdata);
crypto.subtle.encrypt(this.cipher_out_params, this.cipher_out_key, bdata)
.then(encrypted => this.send_packet(encrypted, payload_size, true))
.then(encrypted => this.send_packet(new Uint8Array(encrypted), payload_size, true))
.catch(err => this.protocol_error("failed to encrypt packet: "+err));
return;
}
Expand Down

0 comments on commit 4395971

Please sign in to comment.