PcAPI_getSession → int

SYNOPSIS

#include "PcAPIL.h"

int PcAPI_getSession(const char* client_ip);

DESCRIPTION

The PcAPI_getSession function converts the client_ip passed as an argument into a hash string and uses it to find a session in the key server session pool. If an existing session exists, it returns the existing session, and if there is no session in the session pool, it creates a new session and returns a signed 32-bit integer representing the session ID. The returned session ID is used for encryption/decryption.

In addition, the returned session ID can be used for logging and auditing purposes on the server-side. This enables audit tracking of encryption/decryption activities.

RETURN VALUE

The function returns a signed 32-bit integer representing the session ID upon success.

If an error occurs, it returns an error code less than 0.

ERRORS

-30309, -30310, -30312, -30315, -30316, -30340, -30341, -30342, -30343, -30344