Logout

Namespace:  Cryptware.NCryptoki
Assembly:  NCryptoki (in NCryptoki.dll)

Syntax

Visual Basic (Declaration)
Public Function Logout As Integer
C#
public int Logout()
Visual C++
public:
virtual int Logout() sealed
JavaScript
function logout();

Return Value

0 if no error occurs, PKCS#11 error code otherwise

Implements

ISession..::..Logout()()()()

Remarks

Depending on the current user type, if the call succeeds, each of the application’s sessions will enter either the “R/W Public Session” state or the “R/O Public Session” state. When Logout successfully executes, any of the application’s handles to private objects become invalid (even if a user is later logged back into the token, those handles remain invalid). In addition, all private session objects from sessions belonging to the application are destroyed.
If there are any active cryptographic or object-finding operations in an application’s session, and then Logout is successfully executed by that application, it may or may not be the case that those operations are still active. Therefore, before logging out, any active operations should be finished.

See Also