LibreOffice
LibreOffice 4.1 SDK C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #ifndef _RTL_CIPHER_H_
21 #define _RTL_CIPHER_H_
22 
23 #include "sal/config.h"
24 
25 #include "sal/saldllapi.h"
26 #include "sal/types.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 /*========================================================================
33  *
34  * rtlCipher interface.
35  *
36  *======================================================================*/
39 typedef void* rtlCipher;
40 
41 
46 {
51 };
52 
56 
57 
62 {
68 };
69 
73 
74 
79 {
85 };
86 
90 
91 
95 {
105 };
106 
110 
111 
120 SAL_DLLPUBLIC rtlCipher SAL_CALL rtl_cipher_create (
121  rtlCipherAlgorithm Algorithm,
122  rtlCipherMode Mode
124 
125 
137 SAL_DLLPUBLIC rtlCipherError SAL_CALL rtl_cipher_init (
138  rtlCipher Cipher,
139  rtlCipherDirection Direction,
140  const sal_uInt8 *pKeyData, sal_Size nKeyLen,
141  const sal_uInt8 *pArgData, sal_Size nArgLen
143 
144 
156 SAL_DLLPUBLIC rtlCipherError SAL_CALL rtl_cipher_encode (
157  rtlCipher Cipher,
158  const void *pData, sal_Size nDatLen,
159  sal_uInt8 *pBuffer, sal_Size nBufLen
161 
162 
174 SAL_DLLPUBLIC rtlCipherError SAL_CALL rtl_cipher_decode (
175  rtlCipher Cipher,
176  const void *pData, sal_Size nDatLen,
177  sal_uInt8 *pBuffer, sal_Size nBufLen
179 
180 
185 SAL_DLLPUBLIC void SAL_CALL rtl_cipher_destroy (
186  rtlCipher Cipher
188 
189 
190 /*========================================================================
191  *
192  * rtl_cipherBF (Blowfish) interface.
193  *
194  *======================================================================*/
202 SAL_DLLPUBLIC rtlCipher SAL_CALL rtl_cipher_createBF (
203  rtlCipherMode Mode
205 
206 
210 SAL_DLLPUBLIC rtlCipherError SAL_CALL rtl_cipher_initBF (
211  rtlCipher Cipher,
212  rtlCipherDirection Direction,
213  const sal_uInt8 *pKeyData, sal_Size nKeyLen,
214  const sal_uInt8 *pArgData, sal_Size nArgLen
216 
217 
221 SAL_DLLPUBLIC rtlCipherError SAL_CALL rtl_cipher_encodeBF (
222  rtlCipher Cipher,
223  const void *pData, sal_Size nDatLen,
224  sal_uInt8 *pBuffer, sal_Size nBufLen
226 
227 
231 SAL_DLLPUBLIC rtlCipherError SAL_CALL rtl_cipher_decodeBF (
232  rtlCipher Cipher,
233  const void *pData, sal_Size nDatLen,
234  sal_uInt8 *pBuffer, sal_Size nBufLen
236 
237 
241 SAL_DLLPUBLIC void SAL_CALL rtl_cipher_destroyBF (
242  rtlCipher Cipher
244 
245 
246 /*========================================================================
247  *
248  * rtl_cipherARCFOUR (RC4) interface.
249  *
250  *======================================================================*/
261 SAL_DLLPUBLIC rtlCipher SAL_CALL rtl_cipher_createARCFOUR (
262  rtlCipherMode Mode
264 
265 
269 SAL_DLLPUBLIC rtlCipherError SAL_CALL rtl_cipher_initARCFOUR (
270  rtlCipher Cipher,
271  rtlCipherDirection Direction,
272  const sal_uInt8 *pKeyData, sal_Size nKeyLen,
273  const sal_uInt8 *pArgData, sal_Size nArgLen
275 
276 
280 SAL_DLLPUBLIC rtlCipherError SAL_CALL rtl_cipher_encodeARCFOUR (
281  rtlCipher Cipher,
282  const void *pData, sal_Size nDatLen,
283  sal_uInt8 *pBuffer, sal_Size nBufLen
285 
286 
290 SAL_DLLPUBLIC rtlCipherError SAL_CALL rtl_cipher_decodeARCFOUR (
291  rtlCipher Cipher,
292  const void *pData, sal_Size nDatLen,
293  sal_uInt8 *pBuffer, sal_Size nBufLen
295 
296 
301  rtlCipher Cipher
303 
304 
305 /*========================================================================
306  *
307  * The End.
308  *
309  *======================================================================*/
310 
311 #ifdef __cplusplus
312 }
313 #endif
314 
315 #endif /* !_RTL_CIPHER_H_ */
316 
317 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */