generateSignedPreKey function
Implementation
SignedPreKeyRecord generateSignedPreKey(
IdentityKeyPair identityKeyPair, int signedPreKeyId) {
final keyPair = Curve.generateKeyPair();
final signature = Curve.calculateSignature(
identityKeyPair.getPrivateKey(), keyPair.publicKey.serialize());
return SignedPreKeyRecord(signedPreKeyId,
Int64(DateTime.now().millisecondsSinceEpoch), keyPair, signature);
}