Don't use encrypted key for hmac
This commit is contained in:
parent
cfcca0d782
commit
19be33b17d
|
@ -65,7 +65,7 @@ export default new class E2EE extends BuiltinModule {
|
||||||
async createHmac(data) {
|
async createHmac(data) {
|
||||||
const haveKey = this.getKey(DiscordApi.currentChannel.id);
|
const haveKey = this.getKey(DiscordApi.currentChannel.id);
|
||||||
if (!haveKey) return null;
|
if (!haveKey) return null;
|
||||||
return Security.createHmac(haveKey, data);
|
return Security.createHmac(Security.decrypt(seed, [this.master, haveKey]), data);
|
||||||
}
|
}
|
||||||
|
|
||||||
getKey(channelId) {
|
getKey(channelId) {
|
||||||
|
|
Loading…
Reference in New Issue