LibreOffice
LibreOffice 24.8 SDK C/C++ API Reference
 
Loading...
Searching...
No Matches
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/*
21 * This file is part of LibreOffice published API.
22 */
23
24#ifndef INCLUDED_RTL_CIPHER_H
25#define INCLUDED_RTL_CIPHER_H
26
27#include "sal/config.h"
28
29#include "sal/saldllapi.h"
30#include "sal/types.h"
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
38typedef void* rtlCipher;
39
50
54
66
70
82
86
87
102
106
107
117 rtlCipherAlgorithm Algorithm,
118 rtlCipherMode Mode
120
133 rtlCipher Cipher,
134 rtlCipherDirection Direction,
135 const sal_uInt8 *pKeyData, sal_Size nKeyLen,
136 const sal_uInt8 *pArgData, sal_Size nArgLen
138
151 rtlCipher Cipher,
152 const void *pData, sal_Size nDatLen,
153 sal_uInt8 *pBuffer, sal_Size nBufLen
155
168 rtlCipher Cipher,
169 const void *pData, sal_Size nDatLen,
170 sal_uInt8 *pBuffer, sal_Size nBufLen
172
180 rtlCipher Cipher
182
191 rtlCipherMode Mode
193
198 rtlCipher Cipher,
199 rtlCipherDirection Direction,
200 const sal_uInt8 *pKeyData, sal_Size nKeyLen,
201 const sal_uInt8 *pArgData, sal_Size nArgLen
203
208 rtlCipher Cipher,
209 const void *pData, sal_Size nDatLen,
210 sal_uInt8 *pBuffer, sal_Size nBufLen
212
217 rtlCipher Cipher,
218 const void *pData, sal_Size nDatLen,
219 sal_uInt8 *pBuffer, sal_Size nBufLen
221
226 rtlCipher Cipher
228
240 rtlCipherMode Mode
242
247 rtlCipher Cipher,
248 rtlCipherDirection Direction,
249 const sal_uInt8 *pKeyData, sal_Size nKeyLen,
250 const sal_uInt8 *pArgData, sal_Size nArgLen
252
257 rtlCipher Cipher,
258 const void *pData, sal_Size nDatLen,
259 sal_uInt8 *pBuffer, sal_Size nBufLen
261
266 rtlCipher Cipher,
267 const void *pData, sal_Size nDatLen,
268 sal_uInt8 *pBuffer, sal_Size nBufLen
270
275 rtlCipher Cipher
277
278#ifdef __cplusplus
279}
280#endif
281
282#endif /* ! INCLUDED_RTL_CIPHER_H */
283
284/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define SAL_MAX_ENUM
Definition types.h:205
unsigned char sal_uInt8
Definition types.h:44
#define SAL_THROW_EXTERN_C()
Nothrow specification for C functions.
Definition types.h:352
#define SAL_DLLPUBLIC
Definition saldllapi.h:34
__rtl_CipherMode
Cipher Mode enumeration.
Definition cipher.h:59
@ rtl_Cipher_ModeStream
Definition cipher.h:62
@ rtl_Cipher_ModeCBC
Definition cipher.h:61
@ rtl_Cipher_ModeInvalid
Definition cipher.h:63
@ rtl_Cipher_ModeECB
Definition cipher.h:60
@ rtl_Cipher_Mode_FORCE_EQUAL_SIZE
Definition cipher.h:64
SAL_DLLPUBLIC rtlCipher rtl_cipher_createARCFOUR(rtlCipherMode Mode) SAL_THROW_EXTERN_C()
Create a RC4 cipher handle for the given mode.
enum __rtl_CipherAlgorithm rtlCipherAlgorithm
Cipher Algorithm type.
Definition cipher.h:53
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.
enum __rtl_CipherDirection rtlCipherDirection
Cipher Direction type.
Definition cipher.h:85
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.
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:75
@ rtl_Cipher_DirectionEncode
Definition cipher.h:78
@ rtl_Cipher_DirectionBoth
Definition cipher.h:76
@ rtl_Cipher_DirectionDecode
Definition cipher.h:77
@ rtl_Cipher_Direction_FORCE_EQUAL_SIZE
Definition cipher.h:80
@ rtl_Cipher_DirectionInvalid
Definition cipher.h:79
SAL_DLLPUBLIC void rtl_cipher_destroy(rtlCipher Cipher) SAL_THROW_EXTERN_C()
Destroy a cipher handle.
void * rtlCipher
Cipher Handle opaque type.
Definition cipher.h:38
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.
enum __rtl_CipherError rtlCipherError
Error Code type.
Definition cipher.h:105
SAL_DLLPUBLIC void rtl_cipher_destroyARCFOUR(rtlCipher Cipher) SAL_THROW_EXTERN_C()
Destroy a RC4 cipher handle.
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 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_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.
__rtl_CipherError
Error Code enumeration.
Definition cipher.h:91
@ rtl_Cipher_E_Unknown
Definition cipher.h:99
@ rtl_Cipher_E_Algorithm
Definition cipher.h:94
@ rtl_Cipher_E_Direction
Definition cipher.h:95
@ rtl_Cipher_E_None
Definition cipher.h:92
@ rtl_Cipher_E_Mode
Definition cipher.h:96
@ rtl_Cipher_E_BufferSize
Definition cipher.h:97
@ rtl_Cipher_E_Argument
Definition cipher.h:93
@ rtl_Cipher_E_Memory
Definition cipher.h:98
@ rtl_Cipher_E_FORCE_EQUAL_SIZE
Definition cipher.h:100
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_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.
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.
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.
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.
__rtl_CipherAlgorithm
Cipher Algorithm enumeration.
Definition cipher.h:44
@ rtl_Cipher_AlgorithmInvalid
Definition cipher.h:47
@ rtl_Cipher_AlgorithmARCFOUR
Definition cipher.h:46
@ rtl_Cipher_Algorithm_FORCE_EQUAL_SIZE
Definition cipher.h:48
@ rtl_Cipher_AlgorithmBF
Definition cipher.h:45
enum __rtl_CipherMode rtlCipherMode
Cipher Mode type.
Definition cipher.h:69