computeSecretHex function Null safety

String computeSecretHex(
  1. PrivateKey selfPriv,
  2. PublicKey otherPub
)

Implementation

String computeSecretHex(PrivateKey selfPriv, PublicKey otherPub) {
  var sec = computeSecret(selfPriv, otherPub);
  return List<String>.generate(
          sec.length, (index) => sec[index].toRadixString(16).padLeft(2, '0'))
      .join();
}