@@ -278,11 +278,25 @@ impl Cipher {
278
278
unsafe { Cipher ( ffi:: EVP_des_ede3_cbc ( ) ) }
279
279
}
280
280
281
+ pub fn des_ede3_ecb ( ) -> Cipher {
282
+ unsafe { Cipher ( ffi:: EVP_des_ede3_ecb ( ) ) }
283
+ }
284
+
281
285
#[ cfg( not( boringssl) ) ]
282
286
pub fn des_ede3_cfb64 ( ) -> Cipher {
283
287
unsafe { Cipher ( ffi:: EVP_des_ede3_cfb64 ( ) ) }
284
288
}
285
289
290
+ #[ cfg( not( boringssl) ) ]
291
+ pub fn des_ede3_cfb8 ( ) -> Cipher {
292
+ unsafe { Cipher ( ffi:: EVP_des_ede3_cfb8 ( ) ) }
293
+ }
294
+
295
+ #[ cfg( not( boringssl) ) ]
296
+ pub fn des_ede3_ofb ( ) -> Cipher {
297
+ unsafe { Cipher ( ffi:: EVP_des_ede3_ofb ( ) ) }
298
+ }
299
+
286
300
#[ cfg( not( osslconf = "OPENSSL_NO_RC4" ) ) ]
287
301
pub fn rc4 ( ) -> Cipher {
288
302
unsafe { Cipher ( ffi:: EVP_rc4 ( ) ) }
@@ -293,21 +307,81 @@ impl Cipher {
293
307
unsafe { Cipher ( ffi:: EVP_camellia_128_cbc ( ) ) }
294
308
}
295
309
310
+ #[ cfg( not( osslconf = "OPENSSL_NO_CAMELLIA" ) ) ]
311
+ pub fn camellia_128_ecb ( ) -> Cipher {
312
+ unsafe { Cipher ( ffi:: EVP_camellia_128_ecb ( ) ) }
313
+ }
314
+
315
+ #[ cfg( not( osslconf = "OPENSSL_NO_CAMELLIA" ) ) ]
316
+ pub fn camellia_128_ofb ( ) -> Cipher {
317
+ unsafe { Cipher ( ffi:: EVP_camellia_128_ofb ( ) ) }
318
+ }
319
+
320
+ #[ cfg( not( osslconf = "OPENSSL_NO_CAMELLIA" ) ) ]
321
+ pub fn camellia_128_cfb128 ( ) -> Cipher {
322
+ unsafe { Cipher ( ffi:: EVP_camellia_128_cfb128 ( ) ) }
323
+ }
324
+
296
325
#[ cfg( not( osslconf = "OPENSSL_NO_CAMELLIA" ) ) ]
297
326
pub fn camellia_192_cbc ( ) -> Cipher {
298
327
unsafe { Cipher ( ffi:: EVP_camellia_192_cbc ( ) ) }
299
328
}
300
329
330
+ #[ cfg( not( osslconf = "OPENSSL_NO_CAMELLIA" ) ) ]
331
+ pub fn camellia_192_ecb ( ) -> Cipher {
332
+ unsafe { Cipher ( ffi:: EVP_camellia_192_ecb ( ) ) }
333
+ }
334
+
335
+ #[ cfg( not( osslconf = "OPENSSL_NO_CAMELLIA" ) ) ]
336
+ pub fn camellia_192_ofb ( ) -> Cipher {
337
+ unsafe { Cipher ( ffi:: EVP_camellia_192_ofb ( ) ) }
338
+ }
339
+
340
+ #[ cfg( not( osslconf = "OPENSSL_NO_CAMELLIA" ) ) ]
341
+ pub fn camellia_192_cfb128 ( ) -> Cipher {
342
+ unsafe { Cipher ( ffi:: EVP_camellia_192_cfb128 ( ) ) }
343
+ }
344
+
301
345
#[ cfg( not( osslconf = "OPENSSL_NO_CAMELLIA" ) ) ]
302
346
pub fn camellia_256_cbc ( ) -> Cipher {
303
347
unsafe { Cipher ( ffi:: EVP_camellia_256_cbc ( ) ) }
304
348
}
305
349
350
+ #[ cfg( not( osslconf = "OPENSSL_NO_CAMELLIA" ) ) ]
351
+ pub fn camellia_256_ecb ( ) -> Cipher {
352
+ unsafe { Cipher ( ffi:: EVP_camellia_256_ecb ( ) ) }
353
+ }
354
+
355
+ #[ cfg( not( osslconf = "OPENSSL_NO_CAMELLIA" ) ) ]
356
+ pub fn camellia_256_ofb ( ) -> Cipher {
357
+ unsafe { Cipher ( ffi:: EVP_camellia_256_ofb ( ) ) }
358
+ }
359
+
360
+ #[ cfg( not( osslconf = "OPENSSL_NO_CAMELLIA" ) ) ]
361
+ pub fn camellia_256_cfb128 ( ) -> Cipher {
362
+ unsafe { Cipher ( ffi:: EVP_camellia_256_cfb128 ( ) ) }
363
+ }
364
+
306
365
#[ cfg( not( osslconf = "OPENSSL_NO_CAST" ) ) ]
307
366
pub fn cast5_cbc ( ) -> Cipher {
308
367
unsafe { Cipher ( ffi:: EVP_cast5_cbc ( ) ) }
309
368
}
310
369
370
+ #[ cfg( not( osslconf = "OPENSSL_NO_CAST" ) ) ]
371
+ pub fn cast5_ecb ( ) -> Cipher {
372
+ unsafe { Cipher ( ffi:: EVP_cast5_ecb ( ) ) }
373
+ }
374
+
375
+ #[ cfg( not( osslconf = "OPENSSL_NO_CAST" ) ) ]
376
+ pub fn cast5_ofb ( ) -> Cipher {
377
+ unsafe { Cipher ( ffi:: EVP_cast5_ofb ( ) ) }
378
+ }
379
+
380
+ #[ cfg( not( osslconf = "OPENSSL_NO_CAST" ) ) ]
381
+ pub fn cast5_cfb64 ( ) -> Cipher {
382
+ unsafe { Cipher ( ffi:: EVP_cast5_cfb64 ( ) ) }
383
+ }
384
+
311
385
/// Requires OpenSSL 1.1.0 or newer.
312
386
#[ cfg( all( ossl110, not( osslconf = "OPENSSL_NO_CHACHA" ) ) ) ]
313
387
pub fn chacha20 ( ) -> Cipher {
@@ -325,6 +399,21 @@ impl Cipher {
325
399
unsafe { Cipher ( ffi:: EVP_idea_cbc ( ) ) }
326
400
}
327
401
402
+ #[ cfg( not( osslconf = "OPENSSL_NO_IDEA" ) ) ]
403
+ pub fn idea_ecb ( ) -> Cipher {
404
+ unsafe { Cipher ( ffi:: EVP_idea_ecb ( ) ) }
405
+ }
406
+
407
+ #[ cfg( not( osslconf = "OPENSSL_NO_IDEA" ) ) ]
408
+ pub fn idea_ofb ( ) -> Cipher {
409
+ unsafe { Cipher ( ffi:: EVP_idea_ofb ( ) ) }
410
+ }
411
+
412
+ #[ cfg( not( osslconf = "OPENSSL_NO_IDEA" ) ) ]
413
+ pub fn idea_cfb64 ( ) -> Cipher {
414
+ unsafe { Cipher ( ffi:: EVP_idea_cfb64 ( ) ) }
415
+ }
416
+
328
417
#[ cfg( not( osslconf = "OPENSSL_NO_SEED" ) ) ]
329
418
pub fn seed_cbc ( ) -> Cipher {
330
419
unsafe { Cipher ( ffi:: EVP_seed_cbc ( ) ) }
0 commit comments