Use protopiler for protocol buffers

Co-authored-by: Jamie Kyle <jamie@signal.org>
This commit is contained in:
Fedor Indutny
2026-03-10 15:31:29 -07:00
committed by GitHub
parent b0e19f334e
commit c4ee32e9ee
97 changed files with 6197 additions and 6362 deletions

View File

@@ -280,12 +280,11 @@ export default class AccountManager extends EventTarget {
}
const encrypted = encryptDeviceName(name, identityKey.publicKey);
const proto = new Proto.DeviceName();
proto.ephemeralPublic = encrypted.ephemeralPublic.serialize();
proto.syntheticIv = encrypted.syntheticIv;
proto.ciphertext = encrypted.ciphertext;
const bytes = Proto.DeviceName.encode(proto).finish();
const bytes = Proto.DeviceName.encode({
ephemeralPublic: encrypted.ephemeralPublic.serialize(),
syntheticIv: encrypted.syntheticIv,
ciphertext: encrypted.ciphertext,
});
return Bytes.toBase64(bytes);
}