mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
sha256
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import * as message from "./message.js";
|
||||
import * as rendezvous from "./rendezvous.js";
|
||||
import * as sha256 from "fast-sha256";
|
||||
|
||||
type Keys = "message" | "open" | "close" | "error";
|
||||
|
||||
@@ -76,4 +77,10 @@ export default class Websock {
|
||||
let bytes = new Uint8Array(e.data);
|
||||
}
|
||||
}
|
||||
|
||||
hash(datas: [Uint8Array]): Uint8Array {
|
||||
const hasher = new sha256.Hash();
|
||||
datas.forEach((data) => hasher.update(data));
|
||||
return hasher.digest();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user