code: function getK(params, S_buf) {
    assertIsNBuffer(S_buf, params, "S");
    return crypto.createHash(params.hash)
        .update(S_buf)
        .digest();
  }
docs: /*
  Compute the shared session key K from S
  
  params:
  params (obj)     group parameters, with .N, .g, .hash
  S (buffer)       Session key
  
  returns: buffer