SenderKeyDistributionMessageWrapper constructor
SenderKeyDistributionMessageWrapper(
- int id,
- int iteration,
- Uint8List chainKey,
- ECPublicKey signatureKey,
Implementation
SenderKeyDistributionMessageWrapper(
int id, int iteration, Uint8List chainKey, ECPublicKey signatureKey) {
final version = Uint8List.fromList([
ByteUtil.intsToByteHighAndLow(
CiphertextMessage.currentVersion, CiphertextMessage.currentVersion)
]);
final protobuf = SenderKeyDistributionMessage.create()
..id = id
..iteration = iteration
..chainKey = List.from(chainKey)
..signingKey = List.from(signatureKey.serialize());
_id = id;
_iteration = iteration;
_chainKey = chainKey;
_signatureKey = signatureKey;
_serialized = ByteUtil.combine([version, protobuf.writeToBuffer()]);
}