My Project
UDK 3.2.7 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  *======================================================================*/
201 SAL_DLLPUBLIC rtlCipher SAL_CALL rtl_cipher_createBF (
202  rtlCipherMode Mode
204 
205 
209 SAL_DLLPUBLIC rtlCipherError SAL_CALL rtl_cipher_initBF (
210  rtlCipher Cipher,
211  rtlCipherDirection Direction,
212  const sal_uInt8 *pKeyData, sal_Size nKeyLen,
213  const sal_uInt8 *pArgData, sal_Size nArgLen
215 
216 
220 SAL_DLLPUBLIC rtlCipherError SAL_CALL rtl_cipher_encodeBF (
221  rtlCipher Cipher,
222  const void *pData, sal_Size nDatLen,
223  sal_uInt8 *pBuffer, sal_Size nBufLen
225 
226 
230 SAL_DLLPUBLIC rtlCipherError SAL_CALL rtl_cipher_decodeBF (
231  rtlCipher Cipher,
232  const void *pData, sal_Size nDatLen,
233  sal_uInt8 *pBuffer, sal_Size nBufLen
235 
236 
240 SAL_DLLPUBLIC void SAL_CALL rtl_cipher_destroyBF (
241  rtlCipher Cipher
243 
244 
245 /*========================================================================
246  *
247  * rtl_cipherARCFOUR (RC4) interface.
248  *
249  *======================================================================*/
259 SAL_DLLPUBLIC rtlCipher SAL_CALL rtl_cipher_createARCFOUR (
260  rtlCipherMode Mode
262 
263 
267 SAL_DLLPUBLIC rtlCipherError SAL_CALL rtl_cipher_initARCFOUR (
268  rtlCipher Cipher,
269  rtlCipherDirection Direction,
270  const sal_uInt8 *pKeyData, sal_Size nKeyLen,
271  const sal_uInt8 *pArgData, sal_Size nArgLen
273 
274 
278 SAL_DLLPUBLIC rtlCipherError SAL_CALL rtl_cipher_encodeARCFOUR (
279  rtlCipher Cipher,
280  const void *pData, sal_Size nDatLen,
281  sal_uInt8 *pBuffer, sal_Size nBufLen
283 
284 
288 SAL_DLLPUBLIC rtlCipherError SAL_CALL rtl_cipher_decodeARCFOUR (
289  rtlCipher Cipher,
290  const void *pData, sal_Size nDatLen,
291  sal_uInt8 *pBuffer, sal_Size nBufLen
293 
294 
299  rtlCipher Cipher
301 
302 
303 /*========================================================================
304  *
305  * The End.
306  *
307  *======================================================================*/
308 
309 #ifdef __cplusplus
310 }
311 #endif
312 
313 #endif /* !_RTL_CIPHER_H_ */
314 
315 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */