/** * Constructor taking the token and the session handle. * * @param token * The token this session operates with. * @param sessionHandle * The session handle to perform the operations with. * @preconditions (token <> null) * @postconditions */ protected Session(Token token, long sessionHandle) { this.token = Util.requireNonNull("token", token); this.module = token.getSlot().getModule(); this.pkcs11Module = module.getPKCS11Module(); this.sessionHandle = sessionHandle; }