calculateM2 static method
Computes the server evidence message (M2) according to the standard routine:
M2 = H( A | M1 | S )
digest
The Digest used as the hashing function H
N
Modulus used to get the pad length
A
The public client value
M1
The client evidence message
S
The secret calculated by both sides
@return M2 The calculated server evidence message
Implementation
static BigInt calculateM2(
Digest digest, BigInt N, BigInt? A, BigInt? M1, BigInt? S) {
return hashPaddedTriplet(digest, N, A, M1, S);
}