AlterOffice
AlterOffice 3.4 SDK C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cipher.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 
3 
4 #ifndef INCLUDED_RTL_CIPHER_H
5 #define INCLUDED_RTL_CIPHER_H
6 
7 #include "sal/config.h"
8 
9 #include "sal/saldllapi.h"
10 #include "sal/types.h"
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
18 typedef void* rtlCipher;
19 
24 {
29 };
30 
34 
39 {
45 };
46 
50 
55 {
61 };
62 
66 
67 
71 {
81 };
82 
86 
87 
96 SAL_DLLPUBLIC rtlCipher SAL_CALL rtl_cipher_create (
97  rtlCipherAlgorithm Algorithm,
98  rtlCipherMode Mode
100 
112 SAL_DLLPUBLIC rtlCipherError SAL_CALL rtl_cipher_init (
113  rtlCipher Cipher,
114  rtlCipherDirection Direction,
115  const sal_uInt8 *pKeyData, sal_Size nKeyLen,
116  const sal_uInt8 *pArgData, sal_Size nArgLen
118 
130 SAL_DLLPUBLIC rtlCipherError SAL_CALL rtl_cipher_encode (
131  rtlCipher Cipher,
132  const void *pData, sal_Size nDatLen,
133  sal_uInt8 *pBuffer, sal_Size nBufLen
135 
147 SAL_DLLPUBLIC rtlCipherError SAL_CALL rtl_cipher_decode (
148  rtlCipher Cipher,
149  const void *pData, sal_Size nDatLen,
150  sal_uInt8 *pBuffer, sal_Size nBufLen
152 
159 SAL_DLLPUBLIC void SAL_CALL rtl_cipher_destroy (
160  rtlCipher Cipher
162 
170 SAL_DLLPUBLIC rtlCipher SAL_CALL rtl_cipher_createBF (
171  rtlCipherMode Mode
173 
177 SAL_DLLPUBLIC rtlCipherError SAL_CALL rtl_cipher_initBF (
178  rtlCipher Cipher,
179  rtlCipherDirection Direction,
180  const sal_uInt8 *pKeyData, sal_Size nKeyLen,
181  const sal_uInt8 *pArgData, sal_Size nArgLen
183 
187 SAL_DLLPUBLIC rtlCipherError SAL_CALL rtl_cipher_encodeBF (
188  rtlCipher Cipher,
189  const void *pData, sal_Size nDatLen,
190  sal_uInt8 *pBuffer, sal_Size nBufLen
192 
196 SAL_DLLPUBLIC rtlCipherError SAL_CALL rtl_cipher_decodeBF (
197  rtlCipher Cipher,
198  const void *pData, sal_Size nDatLen,
199  sal_uInt8 *pBuffer, sal_Size nBufLen
201 
205 SAL_DLLPUBLIC void SAL_CALL rtl_cipher_destroyBF (
206  rtlCipher Cipher
208 
219 SAL_DLLPUBLIC rtlCipher SAL_CALL rtl_cipher_createARCFOUR (
220  rtlCipherMode Mode
222 
226 SAL_DLLPUBLIC rtlCipherError SAL_CALL rtl_cipher_initARCFOUR (
227  rtlCipher Cipher,
228  rtlCipherDirection Direction,
229  const sal_uInt8 *pKeyData, sal_Size nKeyLen,
230  const sal_uInt8 *pArgData, sal_Size nArgLen
232 
236 SAL_DLLPUBLIC rtlCipherError SAL_CALL rtl_cipher_encodeARCFOUR (
237  rtlCipher Cipher,
238  const void *pData, sal_Size nDatLen,
239  sal_uInt8 *pBuffer, sal_Size nBufLen
241 
245 SAL_DLLPUBLIC rtlCipherError SAL_CALL rtl_cipher_decodeARCFOUR (
246  rtlCipher Cipher,
247  const void *pData, sal_Size nDatLen,
248  sal_uInt8 *pBuffer, sal_Size nBufLen
250 
255  rtlCipher Cipher
257 
258 #ifdef __cplusplus
259 }
260 #endif
261 
262 #endif /* ! INCLUDED_RTL_CIPHER_H */
263 
264 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
enum __rtl_CipherError rtlCipherError
Error Code type.
Definition: cipher.h:85
Definition: cipher.h:80
Definition: cipher.h:43
Definition: cipher.h:58
__rtl_CipherAlgorithm
Cipher Algorithm enumeration.
Definition: cipher.h:23
unsigned char sal_uInt8
Definition: types.h:24
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.
SAL_DLLPUBLIC rtlCipher rtl_cipher_createARCFOUR(rtlCipherMode Mode) SAL_THROW_EXTERN_C()
Create a RC4 cipher handle for the given mode.
SAL_DLLPUBLIC void rtl_cipher_destroyARCFOUR(rtlCipher Cipher) SAL_THROW_EXTERN_C()
Destroy a RC4 cipher handle.
Definition: cipher.h:78
SAL_DLLPUBLIC void rtl_cipher_destroyBF(rtlCipher Cipher) SAL_THROW_EXTERN_C()
Destroy a Blowfish cipher handle.
__rtl_CipherDirection
Cipher Direction enumeration.
Definition: cipher.h:54
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.
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.
Definition: cipher.h:57
enum __rtl_CipherAlgorithm rtlCipherAlgorithm
Cipher Algorithm type.
Definition: cipher.h:33
Definition: cipher.h:26
Definition: cipher.h:73
CPPU_DLLPUBLIC void SAL_THROW_EXTERN_C()
This method is called to wait for a reply of a previously sent request.
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.
enum __rtl_CipherDirection rtlCipherDirection
Cipher Direction type.
Definition: cipher.h:65
Definition: cipher.h:41
Definition: cipher.h:59
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.
Definition: cipher.h:42
Definition: cipher.h:40
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.
Definition: cipher.h:79
Definition: cipher.h:75
SAL_DLLPUBLIC void rtl_cipher_destroy(rtlCipher Cipher) SAL_THROW_EXTERN_C()
Destroy a cipher handle.
Definition: cipher.h:74
enum __rtl_CipherMode rtlCipherMode
Cipher Mode type.
Definition: cipher.h:49
Definition: cipher.h:76
Definition: cipher.h:27
Definition: cipher.h:25
Definition: cipher.h:72
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.
#define SAL_MAX_ENUM
Definition: types.h:185
void * rtlCipher
Cipher Handle opaque type.
Definition: cipher.h:18
Definition: cipher.h:56
__rtl_CipherMode
Cipher Mode enumeration.
Definition: cipher.h:38
__rtl_CipherError
Error Code enumeration.
Definition: cipher.h:70
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.
Definition: cipher.h:44
SAL_DLLPUBLIC rtlCipher rtl_cipher_create(rtlCipherAlgorithm Algorithm, rtlCipherMode Mode) SAL_THROW_EXTERN_C()
Create a cipher handle for the given algorithm and mode.
SAL_DLLPUBLIC rtlCipher rtl_cipher_createBF(rtlCipherMode Mode) SAL_THROW_EXTERN_C()
Create a Blowfish cipher handle for the given mode.
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.
Definition: cipher.h:77
#define SAL_DLLPUBLIC
Definition: saldllapi.h:14