Ordo  0.3.4
Symmetric Cryptography Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
identification.h
Go to the documentation of this file.
1 /*===-- common/identification.h ------------------------*- PUBLIC -*- H -*-===*/
17 /*===----------------------------------------------------------------------===*/
18 
19 #ifndef ORDO_IDENTIFICATION_H
20 #define ORDO_IDENTIFICATION_H
21 
23 #include "ordo/common/interface.h"
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 /*===----------------------------------------------------------------------===*/
31 
32 #define prim_avail ordo_prim_avail
33 #define prim_name ordo_prim_name
34 #define prim_type ordo_prim_type
35 #define prim_from_name ordo_prim_from_name
36 #define prims_by_type ordo_prims_by_type
37 #define prim_default ordo_prim_default
38 
39 /*===----------------------------------------------------------------------===*/
40 
46 {
47  PRIM_TYPE_UNKNOWN = 0,
48  PRIM_TYPE_HASH,
49  PRIM_TYPE_BLOCK,
50  PRIM_TYPE_STREAM,
51  PRIM_TYPE_BLOCK_MODE
52 };
53 
58 typedef int prim_t;
59 
64 #define PRIM_UNKNOWN ((prim_t)0x0000)
65 
66 #define HASH_MD5 ((prim_t)0x8110)
67 #define HASH_SHA1 ((prim_t)0x8310)
68 #define HASH_SHA256 ((prim_t)0x8010)
69 #define HASH_SKEIN256 ((prim_t)0x8210)
70 
71 #define BLOCK_NULLCIPHER ((prim_t)0xFF20)
72 #define BLOCK_THREEFISH256 ((prim_t)0x1A20)
73 #define BLOCK_AES ((prim_t)0x0C20)
74 
75 #define STREAM_RC4 ((prim_t)0x3130)
76 
77 #define BLOCK_MODE_ECB ((prim_t)0x8040)
78 #define BLOCK_MODE_CBC ((prim_t)0x8140)
79 #define BLOCK_MODE_CTR ((prim_t)0x8240)
80 #define BLOCK_MODE_CFB ((prim_t)0x8340)
81 #define BLOCK_MODE_OFB ((prim_t)0x8440)
82 
89 ORDO_PUBLIC
90 int prim_avail(prim_t prim);
91 
103 ORDO_PUBLIC
104 const char *prim_name(prim_t prim);
105 
114 ORDO_PUBLIC
115 enum PRIM_TYPE prim_type(prim_t prim);
116 
125 ORDO_PUBLIC
126 prim_t prim_from_name(const char *name);
127 
134 ORDO_PUBLIC
135 const prim_t *prims_by_type(enum PRIM_TYPE type);
136 
155 ORDO_PUBLIC
156 prim_t prim_default(enum PRIM_TYPE type);
157 
158 /*===----------------------------------------------------------------------===*/
159 
160 #ifdef __cplusplus
161 }
162 #endif
163 
164 #endif
int prim_t
Data type which holds a primitive identifier.
Definition: identification.h:58
ORDO_PUBLIC int prim_avail(prim_t prim)
Definition: identification.c:20
ORDO_PUBLIC const prim_t * prims_by_type(enum PRIM_TYPE type)
Definition: identification.c:133
ORDO_PUBLIC const char * prim_name(prim_t prim)
Definition: identification.c:42
ORDO_PUBLIC enum PRIM_TYPE prim_type(prim_t prim)
Definition: identification.c:67
PRIM_TYPE
Definition: identification.h:45
ORDO_PUBLIC prim_t prim_default(enum PRIM_TYPE type)
Definition: identification.c:206
ORDO_PUBLIC prim_t prim_from_name(const char *name)
Definition: identification.c:85