Enables an application to create an FESF encrypted data stream (a file, a series of network messages, etc.) from a plaintext file.
bool
FesfSaEncrypt(
_In_ const wchar_t *Path,
_In_ FE_ENCRYPT_WRITER CallbackRoutine
_In_ void *CallbackContext,
_In_ void *SolutionHeader,
_In_ uint32_t SolutionHeaderSize,
_In_ uint32_t CipherBlockSize,
)
Path [in]
A string containing the path of a file to encrypt. Refer to the Remarks section.
CallbackRoutine [in]
A pointer to a caller supplied EncryptCallback routine. Encrypt calls this function for each segment of data in the FESF encrypted data stream.
CallbackContext [in]
A pointer to a caller-provided context structure passed to every invocation of the provided callback.
SolutionHeader [in]
A buffer that contains the Solution Header that FESF will include in its metadata in the process of encrypting the file.
SolutionHeaderSize [in]
The size of the buffer pointed to by SolutionHeader, in bytes.
CipherBlockSize [in]
The block size of the encryption algorithm used by the Callback function.
Returns TRUE if the function successfully processes all the data, FALSE otherwise.
For Windows platforms, a specific status code for this function is reported with GetLastError().
For Linux platforms, the errno variable is set.
This function provides the caller-supplied EncryptCallback with a stream of sequential data that will produce a valid FESF encrypted file. The Callback will be called multiple times until all file data has been supplied. See the description of EncryptCallback for more information.
If FESF cannot open the file described by Path for exclusive access, an error is returned.
The provided SolutionHeader is identical to the PolHeaderData buffer returned by the Solution’s Policy DLL from FESF’s PolGetKeyNewFile callback.
The callback is called synchronously with respect to this function. That is, the application’s call to Encrypt returns when all data has been supplied by FESF to the callback.
Software version |
FESF Version 1 (added) |
Supported FESF State |
FESF Not Installed ONLY |
Windows Library |
FesfSa.lib |
Linux Library |
FESFsa.a |