calculateS method

BigInt? calculateS()

S = (B - kg^x) ^ (a + ux)

Implementation

BigInt? calculateS() {
  var k = SRP6Util.calculateK(digest, N, g);
  var exp = (u! * x!) + a!;
  var tmp = g.modPow(x!, N) * (k % N);

  return (B! - (tmp % N)).modPow(exp, N);
}