question: public static BigInteger calculateKey ( Digest digest , BigInteger N , BigInteger S ) { int padLength = ( N . bitLength ( ) + 7 ) / 8 ; byte [ ] _S = getPadded ( S , padLength ) ; digest . update ( _S , 0 , _S . length ) ; byte [ ] output = new byte [ digest . getDigestSize ( ) ] ; digest . doFinal ( output , 0 ) ; return new BigInteger ( 1 , output ) ; }
target:  Computes the final Key according to the standard routine: Key = H(S)