ATMI C Function Reference
tpseal()
—Marks a typed message buffer for encryption.
#include <atmi.h>
int tpseal(char *data
, TPKEYhKey
, longflags
)
tpseal()
marks, or registers, a message buffer for encryption. The principal who owns hKey
can decrypt this buffer and access its content. A buffer may be sealed for more than one recipient principal by making several calls to tpseal()
.
data
must point to a valid typed message buffer either (1) previously allocated by a process calling tpalloc()
or (2) delivered by the system to a receiving process. The content of the buffer may be modified after tpseal()
is invoked.
When the message buffer pointed to by data
is transmitted from a process, the public key software encrypts the message content and attaches an encryption envelope to the message buffer for each encryption registration request. An encryption envelope enables a receiving process to decrypt the message.
The flags
argument is reserved for future use and must be set to 0.
On failure, this function returns -1 and sets tperrno
to indicate the error condition.