aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/https/lgl/rijndael-api-fst.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon/https/lgl/rijndael-api-fst.h')
-rw-r--r--src/daemon/https/lgl/rijndael-api-fst.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/daemon/https/lgl/rijndael-api-fst.h b/src/daemon/https/lgl/rijndael-api-fst.h
index cbe6411f..088e6bfd 100644
--- a/src/daemon/https/lgl/rijndael-api-fst.h
+++ b/src/daemon/https/lgl/rijndael-api-fst.h
@@ -137,7 +137,7 @@ typedef struct
137 from KEYMATERIAL, a hex string, of KEYLEN size. KEYLEN should be 137 from KEYMATERIAL, a hex string, of KEYLEN size. KEYLEN should be
138 128, 192 or 256. Returns 0 on success, or an error code. */ 138 128, 192 or 256. Returns 0 on success, or an error code. */
139extern rijndael_rc 139extern rijndael_rc
140rijndaelMakeKey (rijndaelKeyInstance * key, rijndael_direction direction, 140MHD_rijndaelMakeKey (rijndaelKeyInstance * key, rijndael_direction direction,
141 size_t keyLen, const char *keyMaterial); 141 size_t keyLen, const char *keyMaterial);
142 142
143/* Initialize cipher state CIPHER for encryption MODE (e.g., 143/* Initialize cipher state CIPHER for encryption MODE (e.g.,
@@ -145,18 +145,18 @@ rijndaelMakeKey (rijndaelKeyInstance * key, rijndael_direction direction,
145 2*RIJNDAEL_MAX_IV_SIZE length. IV may be NULL for modes that do 145 2*RIJNDAEL_MAX_IV_SIZE length. IV may be NULL for modes that do
146 not need an IV (i.e., RIJNDAEL_MODE_ECB). */ 146 not need an IV (i.e., RIJNDAEL_MODE_ECB). */
147extern rijndael_rc 147extern rijndael_rc
148rijndaelCipherInit (rijndaelCipherInstance * cipher, 148MHD_MHD_rijndaelCipherInit (rijndaelCipherInstance * cipher,
149 rijndael_mode mode, const char *IV); 149 rijndael_mode mode, const char *IV);
150 150
151/* Encrypt data in INPUT, of INPUTLEN/8 bytes length, placing the 151/* Encrypt data in INPUT, of INPUTLEN/8 bytes length, placing the
152 output in the pre-allocated OUTBUFFER which must hold at least 152 output in the pre-allocated OUTBUFFER which must hold at least
153 INPUTLEN/8 bytes of data. The CIPHER is used as state, and must be 153 INPUTLEN/8 bytes of data. The CIPHER is used as state, and must be
154 initialized with rijndaelCipherInit before calling this function. 154 initialized with MHD_MHD_rijndaelCipherInit before calling this function.
155 The encryption KEY must be initialized with rijndaelMakeKey before 155 The encryption KEY must be initialized with MHD_rijndaelMakeKey before
156 calling this function. Return the number of bits written, or a 156 calling this function. Return the number of bits written, or a
157 negative rijndael_rc error code. */ 157 negative rijndael_rc error code. */
158extern int 158extern int
159rijndaelBlockEncrypt (rijndaelCipherInstance * cipher, 159MHD_rijndaelBlockEncrypt (rijndaelCipherInstance * cipher,
160 const rijndaelKeyInstance * key, 160 const rijndaelKeyInstance * key,
161 const char *input, size_t inputLen, char *outBuffer); 161 const char *input, size_t inputLen, char *outBuffer);
162 162
@@ -165,24 +165,24 @@ rijndaelBlockEncrypt (rijndaelCipherInstance * cipher,
165 INPUTOCTETS aligned to the next block size boundary. 165 INPUTOCTETS aligned to the next block size boundary.
166 Ciphertext-Stealing as described in RFC 2040 is used to encrypt 166 Ciphertext-Stealing as described in RFC 2040 is used to encrypt
167 partial blocks. The CIPHER is used as state, and must be 167 partial blocks. The CIPHER is used as state, and must be
168 initialized with rijndaelCipherInit before calling this function. 168 initialized with MHD_MHD_rijndaelCipherInit before calling this function.
169 The encryption KEY must be initialized with rijndaelMakeKey before 169 The encryption KEY must be initialized with MHD_rijndaelMakeKey before
170 calling this function. Return the number of bits written, or a 170 calling this function. Return the number of bits written, or a
171 negative rijndael_rc error code. */ 171 negative rijndael_rc error code. */
172extern int 172extern int
173rijndaelPadEncrypt (rijndaelCipherInstance * cipher, 173MHD_rijndaelPadEncrypt (rijndaelCipherInstance * cipher,
174 const rijndaelKeyInstance * key, 174 const rijndaelKeyInstance * key,
175 const char *input, size_t inputOctets, char *outBuffer); 175 const char *input, size_t inputOctets, char *outBuffer);
176 176
177/* Decrypt data in INPUT, of INPUTLEN/8 bytes length, placing the 177/* Decrypt data in INPUT, of INPUTLEN/8 bytes length, placing the
178 output in the pre-allocated OUTBUFFER which must hold at least 178 output in the pre-allocated OUTBUFFER which must hold at least
179 INPUTLEN/8 bytes of data. The CIPHER is used as state, and must be 179 INPUTLEN/8 bytes of data. The CIPHER is used as state, and must be
180 initialized with rijndaelCipherInit before calling this function. 180 initialized with MHD_MHD_rijndaelCipherInit before calling this function.
181 The encryption KEY must be initialized with rijndaelMakeKey before 181 The encryption KEY must be initialized with MHD_rijndaelMakeKey before
182 calling this function. Return the number of bits written, or a 182 calling this function. Return the number of bits written, or a
183 negative rijndael_rc error code. */ 183 negative rijndael_rc error code. */
184extern int 184extern int
185rijndaelBlockDecrypt (rijndaelCipherInstance * cipher, 185MHD_rijndaelBlockDecrypt (rijndaelCipherInstance * cipher,
186 const rijndaelKeyInstance * key, 186 const rijndaelKeyInstance * key,
187 const char *input, size_t inputLen, char *outBuffer); 187 const char *input, size_t inputLen, char *outBuffer);
188 188
@@ -191,12 +191,12 @@ rijndaelBlockDecrypt (rijndaelCipherInstance * cipher,
191 INPUTOCTETS aligned to the next block size boundary. 191 INPUTOCTETS aligned to the next block size boundary.
192 Ciphertext-Stealing as described in RFC 2040 is used to encrypt 192 Ciphertext-Stealing as described in RFC 2040 is used to encrypt
193 partial blocks. The CIPHER is used as state, and must be 193 partial blocks. The CIPHER is used as state, and must be
194 initialized with rijndaelCipherInit before calling this function. 194 initialized with MHD_MHD_rijndaelCipherInit before calling this function.
195 The encryption KEY must be initialized with rijndaelMakeKey before 195 The encryption KEY must be initialized with MHD_rijndaelMakeKey before
196 calling this function. Return the number of bits written, or a 196 calling this function. Return the number of bits written, or a
197 negative rijndael_rc error code. */ 197 negative rijndael_rc error code. */
198extern int 198extern int
199rijndaelPadDecrypt (rijndaelCipherInstance * cipher, 199MHD_rijndaelPadDecrypt (rijndaelCipherInstance * cipher,
200 const rijndaelKeyInstance * key, 200 const rijndaelKeyInstance * key,
201 const char *input, size_t inputOctets, char *outBuffer); 201 const char *input, size_t inputOctets, char *outBuffer);
202 202