SessionCrypto constructor

SessionCrypto({
  1. String? pk,
})

Implementation

SessionCrypto({String? pk}) {
  privateKey = pk != null ? PrivateKey.decode(pk) : PrivateKey.generate();

  sessionId = HEX.encode(privateKey.publicKey);
}