MagickCore 7.0.10
cipher.h
Go to the documentation of this file.
1/*
2 Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization
3 dedicated to making software imaging solutions freely available.
4
5 You may not use this file except in compliance with the License.
6 obtain a copy of the License at
7
8 https://imagemagick.org/script/license.php
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15
16 Wizard's Toolkit secure cipher algorithm methods.
17*/
18#ifndef _WIZARDSTOOLKIT_CIPHER_H
19#define _WIZARDSTOOLKIT_CIPHER_H
20
21#include "wizard/random_.h"
22
23#if defined(__cplusplus) || defined(c_plusplus)
24extern "C" {
25#endif
26
27#define MaxCipherBlocksize 128
28
29typedef enum
30{
38
39typedef enum
40{
48
49typedef struct _CipherInfo
51
55
56extern WizardExport const StringInfo
58
63
64extern WizardExport size_t
66
67extern WizardExport void
71
72/*
73 Deprecated methods.
74*/
78
79#if defined(__cplusplus) || defined(c_plusplus)
80}
81#endif
82
83#endif
WizardExport StringInfo * EncryptCipher(CipherInfo *, StringInfo *)
Definition cipher.c:940
WizardExport CipherInfo * DestroyCipherInfo(CipherInfo *)
Definition cipher.c:703
WizardExport void SetCipherNonce(CipherInfo *, const StringInfo *)
WizardExport void SetCipherKey(CipherInfo *, const StringInfo *)
Definition cipher.c:1429
WizardExport StringInfo * DecipherCipher(CipherInfo *, StringInfo *)
WizardExport size_t GetCipherBlocksize(const CipherInfo *)
Definition cipher.c:1248
WizardExport const StringInfo * GetCipherNonce(CipherInfo *)
Definition cipher.c:1332
WizardExport StringInfo * EncipherCipher(CipherInfo *, StringInfo *)
CipherType
Definition cipher.h:40
@ UndefinedCipher
Definition cipher.h:41
@ SerpentCipher
Definition cipher.h:45
@ ChachaCipher
Definition cipher.h:44
@ NoCipher
Definition cipher.h:42
@ TwofishCipher
Definition cipher.h:46
@ AESCipher
Definition cipher.h:43
CipherMode
Definition cipher.h:30
@ CTRMode
Definition cipher.h:34
@ CFBMode
Definition cipher.h:33
@ CBCMode
Definition cipher.h:32
@ UndefinedMode
Definition cipher.h:31
@ OFBMode
Definition cipher.h:36
@ ECBMode
Definition cipher.h:35
WizardExport StringInfo * DecryptCipher(CipherInfo *, StringInfo *)
WizardExport void ResetCipherNonce(CipherInfo *)
WizardExport StringInfo * GenerateCipherNonce(CipherInfo *)
Definition cipher.c:1278
WizardExport CipherInfo * AcquireCipherInfo(const CipherType, const CipherMode)
#define WizardExport