calculateSessionKey method

  1. @override
BigInt? calculateSessionKey()
override

Computes the final session key as a result of the SRP successful mutual authentication To be called after calculating the server evidence message M2. @return Key: the mutual authenticated symmetric session key @throws CryptoException

Implementation

@override
BigInt? calculateSessionKey() {
  // Verify pre-requirements
  if (S == null || M1 == null || M2 == null) {
    throw Exception(
        'Impossible to compute Key: some data are missing from the previous operations (S,M1,M2)');
  }
  Key = SRP6Util.calculateKey(digest, N, S);
  return Key;
}