Don't use encrypted key for hmac

This commit is contained in:
Jiiks 2018-08-13 12:56:41 +03:00
parent cfcca0d782
commit 19be33b17d
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ export default new class E2EE extends BuiltinModule {
async createHmac(data) {
const haveKey = this.getKey(DiscordApi.currentChannel.id);
if (!haveKey) return null;
return Security.createHmac(haveKey, data);
return Security.createHmac(Security.decrypt(seed, [this.master, haveKey]), data);
}
getKey(channelId) {