LibreOffice
LibreOffice 24.2 SDK C/C++ API Reference
|
Go to the source code of this file.
Typedefs | |
typedef void * | rtlCipher |
Cipher Handle opaque type. More... | |
typedef enum __rtl_CipherAlgorithm | rtlCipherAlgorithm |
Cipher Algorithm type. More... | |
typedef enum __rtl_CipherMode | rtlCipherMode |
Cipher Mode type. More... | |
typedef enum __rtl_CipherDirection | rtlCipherDirection |
Cipher Direction type. More... | |
typedef enum __rtl_CipherError | rtlCipherError |
Error Code type. More... | |
Enumerations | |
enum | __rtl_CipherAlgorithm { rtl_Cipher_AlgorithmBF, rtl_Cipher_AlgorithmARCFOUR, rtl_Cipher_AlgorithmInvalid, rtl_Cipher_Algorithm_FORCE_EQUAL_SIZE = SAL_MAX_ENUM } |
Cipher Algorithm enumeration. More... | |
enum | __rtl_CipherMode { rtl_Cipher_ModeECB, rtl_Cipher_ModeCBC, rtl_Cipher_ModeStream, rtl_Cipher_ModeInvalid, rtl_Cipher_Mode_FORCE_EQUAL_SIZE = SAL_MAX_ENUM } |
Cipher Mode enumeration. More... | |
enum | __rtl_CipherDirection { rtl_Cipher_DirectionBoth, rtl_Cipher_DirectionDecode, rtl_Cipher_DirectionEncode, rtl_Cipher_DirectionInvalid, rtl_Cipher_Direction_FORCE_EQUAL_SIZE = SAL_MAX_ENUM } |
Cipher Direction enumeration. More... | |
enum | __rtl_CipherError { rtl_Cipher_E_None, rtl_Cipher_E_Argument, rtl_Cipher_E_Algorithm, rtl_Cipher_E_Direction, rtl_Cipher_E_Mode, rtl_Cipher_E_BufferSize, rtl_Cipher_E_Memory, rtl_Cipher_E_Unknown, rtl_Cipher_E_FORCE_EQUAL_SIZE = SAL_MAX_ENUM } |
Error Code enumeration. More... | |
Functions | |
SAL_DLLPUBLIC rtlCipher | rtl_cipher_create (rtlCipherAlgorithm Algorithm, rtlCipherMode Mode) SAL_THROW_EXTERN_C() |
Create a cipher handle for the given algorithm and mode. More... | |
SAL_DLLPUBLIC rtlCipherError | rtl_cipher_init (rtlCipher Cipher, rtlCipherDirection Direction, const sal_uInt8 *pKeyData, sal_Size nKeyLen, const sal_uInt8 *pArgData, sal_Size nArgLen) SAL_THROW_EXTERN_C() |
Inititialize a cipher for the given direction. More... | |
SAL_DLLPUBLIC rtlCipherError | rtl_cipher_encode (rtlCipher Cipher, const void *pData, sal_Size nDatLen, sal_uInt8 *pBuffer, sal_Size nBufLen) SAL_THROW_EXTERN_C() |
Encode a buffer under a given cipher algorithm. More... | |
SAL_DLLPUBLIC rtlCipherError | rtl_cipher_decode (rtlCipher Cipher, const void *pData, sal_Size nDatLen, sal_uInt8 *pBuffer, sal_Size nBufLen) SAL_THROW_EXTERN_C() |
Decode a buffer under a given cipher algorithm. More... | |
SAL_DLLPUBLIC void | rtl_cipher_destroy (rtlCipher Cipher) SAL_THROW_EXTERN_C() |
Destroy a cipher handle. More... | |
SAL_DLLPUBLIC rtlCipher | rtl_cipher_createBF (rtlCipherMode Mode) SAL_THROW_EXTERN_C() |
Create a Blowfish cipher handle for the given mode. More... | |
SAL_DLLPUBLIC rtlCipherError | rtl_cipher_initBF (rtlCipher Cipher, rtlCipherDirection Direction, const sal_uInt8 *pKeyData, sal_Size nKeyLen, const sal_uInt8 *pArgData, sal_Size nArgLen) SAL_THROW_EXTERN_C() |
Inititialize a Blowfish cipher for the given direction. More... | |
SAL_DLLPUBLIC rtlCipherError | rtl_cipher_encodeBF (rtlCipher Cipher, const void *pData, sal_Size nDatLen, sal_uInt8 *pBuffer, sal_Size nBufLen) SAL_THROW_EXTERN_C() |
Encode a buffer under the Blowfish cipher algorithm. More... | |
SAL_DLLPUBLIC rtlCipherError | rtl_cipher_decodeBF (rtlCipher Cipher, const void *pData, sal_Size nDatLen, sal_uInt8 *pBuffer, sal_Size nBufLen) SAL_THROW_EXTERN_C() |
Decode a buffer under the Blowfish cipher algorithm. More... | |
SAL_DLLPUBLIC void | rtl_cipher_destroyBF (rtlCipher Cipher) SAL_THROW_EXTERN_C() |
Destroy a Blowfish cipher handle. More... | |
SAL_DLLPUBLIC rtlCipher | rtl_cipher_createARCFOUR (rtlCipherMode Mode) SAL_THROW_EXTERN_C() |
Create a RC4 cipher handle for the given mode. More... | |
SAL_DLLPUBLIC rtlCipherError | rtl_cipher_initARCFOUR (rtlCipher Cipher, rtlCipherDirection Direction, const sal_uInt8 *pKeyData, sal_Size nKeyLen, const sal_uInt8 *pArgData, sal_Size nArgLen) SAL_THROW_EXTERN_C() |
Inititialize a RC4 cipher for the given direction. More... | |
SAL_DLLPUBLIC rtlCipherError | rtl_cipher_encodeARCFOUR (rtlCipher Cipher, const void *pData, sal_Size nDatLen, sal_uInt8 *pBuffer, sal_Size nBufLen) SAL_THROW_EXTERN_C() |
Encode a buffer under the RC4 cipher algorithm. More... | |
SAL_DLLPUBLIC rtlCipherError | rtl_cipher_decodeARCFOUR (rtlCipher Cipher, const void *pData, sal_Size nDatLen, sal_uInt8 *pBuffer, sal_Size nBufLen) SAL_THROW_EXTERN_C() |
Decode a buffer under the RC4 cipher algorithm. More... | |
SAL_DLLPUBLIC void | rtl_cipher_destroyARCFOUR (rtlCipher Cipher) SAL_THROW_EXTERN_C() |
Destroy a RC4 cipher handle. More... | |
typedef void* rtlCipher |
Cipher Handle opaque type.
typedef enum __rtl_CipherAlgorithm rtlCipherAlgorithm |
Cipher Algorithm type.
typedef enum __rtl_CipherDirection rtlCipherDirection |
Cipher Direction type.
typedef enum __rtl_CipherError rtlCipherError |
Error Code type.
typedef enum __rtl_CipherMode rtlCipherMode |
Cipher Mode type.
Cipher Algorithm enumeration.
Enumerator | |
---|---|
rtl_Cipher_AlgorithmBF | |
rtl_Cipher_AlgorithmARCFOUR | |
rtl_Cipher_AlgorithmInvalid | |
rtl_Cipher_Algorithm_FORCE_EQUAL_SIZE |
Cipher Direction enumeration.
Enumerator | |
---|---|
rtl_Cipher_DirectionBoth | |
rtl_Cipher_DirectionDecode | |
rtl_Cipher_DirectionEncode | |
rtl_Cipher_DirectionInvalid | |
rtl_Cipher_Direction_FORCE_EQUAL_SIZE |
enum __rtl_CipherError |
enum __rtl_CipherMode |
Cipher Mode enumeration.
Enumerator | |
---|---|
rtl_Cipher_ModeECB | |
rtl_Cipher_ModeCBC | |
rtl_Cipher_ModeStream | |
rtl_Cipher_ModeInvalid | |
rtl_Cipher_Mode_FORCE_EQUAL_SIZE |
SAL_DLLPUBLIC rtlCipher rtl_cipher_create | ( | rtlCipherAlgorithm | Algorithm, |
rtlCipherMode | Mode | ||
) |
Create a cipher handle for the given algorithm and mode.
[in] | Algorithm | cipher algorithm. |
[in] | Mode | cipher mode. |
SAL_DLLPUBLIC rtlCipher rtl_cipher_createARCFOUR | ( | rtlCipherMode | Mode | ) |
Create a RC4 cipher handle for the given mode.
The RC4 symmetric stream cipher algorithm is specified in Bruce Schneier: Applied Cryptography, 2nd edition, ch. 17.1
[in] | Mode | cipher mode. Must be rtl_Cipher_ModeStream . |
SAL_DLLPUBLIC rtlCipher rtl_cipher_createBF | ( | rtlCipherMode | Mode | ) |
Create a Blowfish cipher handle for the given mode.
The Blowfish block cipher algorithm is specified in Bruce Schneier: Applied Cryptography, 2nd edition, ch. 14.3
SAL_DLLPUBLIC rtlCipherError rtl_cipher_decode | ( | rtlCipher | Cipher, |
const void * | pData, | ||
sal_Size | nDatLen, | ||
sal_uInt8 * | pBuffer, | ||
sal_Size | nBufLen | ||
) |
Decode a buffer under a given cipher algorithm.
[in] | Cipher | cipher handle. |
[in] | pData | ciphertext buffer. |
[in] | nDatLen | ciphertext length in bytes. |
[out] | pBuffer | plaintext buffer. |
[in] | nBufLen | plaintext length in bytes. |
rtl_Cipher_E_None | upon success. |
SAL_DLLPUBLIC rtlCipherError rtl_cipher_decodeARCFOUR | ( | rtlCipher | Cipher, |
const void * | pData, | ||
sal_Size | nDatLen, | ||
sal_uInt8 * | pBuffer, | ||
sal_Size | nBufLen | ||
) |
Decode a buffer under the RC4 cipher algorithm.
SAL_DLLPUBLIC rtlCipherError rtl_cipher_decodeBF | ( | rtlCipher | Cipher, |
const void * | pData, | ||
sal_Size | nDatLen, | ||
sal_uInt8 * | pBuffer, | ||
sal_Size | nBufLen | ||
) |
Decode a buffer under the Blowfish cipher algorithm.
SAL_DLLPUBLIC void rtl_cipher_destroy | ( | rtlCipher | Cipher | ) |
Destroy a cipher handle.
Cipher handle destroyed and invalid.
[in] | Cipher | cipher handle to be destroyed. |
SAL_DLLPUBLIC void rtl_cipher_destroyARCFOUR | ( | rtlCipher | Cipher | ) |
Destroy a RC4 cipher handle.
SAL_DLLPUBLIC void rtl_cipher_destroyBF | ( | rtlCipher | Cipher | ) |
Destroy a Blowfish cipher handle.
SAL_DLLPUBLIC rtlCipherError rtl_cipher_encode | ( | rtlCipher | Cipher, |
const void * | pData, | ||
sal_Size | nDatLen, | ||
sal_uInt8 * | pBuffer, | ||
sal_Size | nBufLen | ||
) |
Encode a buffer under a given cipher algorithm.
[in] | Cipher | cipher handle. |
[in] | pData | plaintext buffer. |
[in] | nDatLen | plaintext length in bytes. |
[out] | pBuffer | ciphertext buffer. |
[in] | nBufLen | ciphertext length in bytes. |
rtl_Cipher_E_None | upon success. |
SAL_DLLPUBLIC rtlCipherError rtl_cipher_encodeARCFOUR | ( | rtlCipher | Cipher, |
const void * | pData, | ||
sal_Size | nDatLen, | ||
sal_uInt8 * | pBuffer, | ||
sal_Size | nBufLen | ||
) |
Encode a buffer under the RC4 cipher algorithm.
SAL_DLLPUBLIC rtlCipherError rtl_cipher_encodeBF | ( | rtlCipher | Cipher, |
const void * | pData, | ||
sal_Size | nDatLen, | ||
sal_uInt8 * | pBuffer, | ||
sal_Size | nBufLen | ||
) |
Encode a buffer under the Blowfish cipher algorithm.
SAL_DLLPUBLIC rtlCipherError rtl_cipher_init | ( | rtlCipher | Cipher, |
rtlCipherDirection | Direction, | ||
const sal_uInt8 * | pKeyData, | ||
sal_Size | nKeyLen, | ||
const sal_uInt8 * | pArgData, | ||
sal_Size | nArgLen | ||
) |
Inititialize a cipher for the given direction.
[in] | Cipher | cipher handle. |
[in] | Direction | cipher direction. |
[in] | pKeyData | key material buffer. |
[in] | nKeyLen | key material length in bytes. |
[in] | pArgData | initialization vector buffer. |
[in] | nArgLen | initialization vector length in bytes. |
rtl_Cipher_E_None | upon success. |
SAL_DLLPUBLIC rtlCipherError rtl_cipher_initARCFOUR | ( | rtlCipher | Cipher, |
rtlCipherDirection | Direction, | ||
const sal_uInt8 * | pKeyData, | ||
sal_Size | nKeyLen, | ||
const sal_uInt8 * | pArgData, | ||
sal_Size | nArgLen | ||
) |
Inititialize a RC4 cipher for the given direction.
SAL_DLLPUBLIC rtlCipherError rtl_cipher_initBF | ( | rtlCipher | Cipher, |
rtlCipherDirection | Direction, | ||
const sal_uInt8 * | pKeyData, | ||
sal_Size | nKeyLen, | ||
const sal_uInt8 * | pArgData, | ||
sal_Size | nArgLen | ||
) |
Inititialize a Blowfish cipher for the given direction.