getSessionKey method

BigInt getSessionKey(
  1. bool doHash
)

Implementation

BigInt getSessionKey(final bool doHash) {

  if (S == null) {
    return BigInt.from(0);
  }

  if (doHash) {
    var convert = config?.getMessageDigestInstance().convert(BigIntHelper.toByteArray(S!));
    var bytes = convert!.bytes;
    return BigInt.from(BigIntHelper.decodeBigInt(Uint8List.fromList(bytes)).toInt());
  }
  else {
    return S!;
  }
}