chore: Update translations
This commit is contained in:
@ -277,7 +277,7 @@ export class EventPublisher {
|
||||
*/
|
||||
async decryptGeneric(content: string, from: string) {
|
||||
const pl = decodeEncryptionPayload(content);
|
||||
switch(pl.v) {
|
||||
switch (pl.v) {
|
||||
case MessageEncryptorVersion.Nip4: {
|
||||
const nip4Payload = `${base64.encode(pl.ciphertext)}?iv=${base64.encode(pl.nonce)}`;
|
||||
return await this.#signer.nip4Decrypt(nip4Payload, from);
|
||||
|
@ -158,4 +158,4 @@ export function decodeEncryptionPayload(p: string) {
|
||||
|
||||
export function encodeEncryptionPayload(p: MessageEncryptorPayload) {
|
||||
return base64.encode(new Uint8Array([p.v, ...p.nonce, ...p.ciphertext]));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user