buildECPublicKeyPacket static method
Implementation
@visibleForTesting
static Uint8List buildECPublicKeyPacket(BigInt publicKey, ECCurve curve,
[int? timestamp, int? type]) {
final List<int> encoded = _timestampAndVersion(0x04, timestamp) +
_curve(curve) +
_keyMaterial(publicKey);
type ??= encoded.length >> 8 == 0 ? 0x98 : 0x99;
return Uint8List.fromList(
[type] + (type == 0x99 ? _mpi(encoded) : [encoded.length] + encoded));
}