IdentityKeyPair.fromSerialized constructor

IdentityKeyPair.fromSerialized(
  1. Uint8List serialized
)

Implementation

IdentityKeyPair.fromSerialized(Uint8List serialized) {
  final structure = IdentityKeyPairStructure.fromBuffer(serialized);
  _publicKey =
      IdentityKey.fromBytes(Uint8List.fromList(structure.publicKey), 0);
  _privateKey =
      Curve.decodePrivatePoint(Uint8List.fromList(structure.privateKey));
}