]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/crypto.h
Add missing cast
[bacula/bacula] / bacula / src / lib / crypto.h
index 1519cf426c3b8da06ee1e35883454f72aafeb1dc..17e546bd6399aa5753717b2cd5ebc592f83ad670 100644 (file)
@@ -19,7 +19,7 @@
  * license please contact Landon Fuller <landonf@opendarwin.org>.
  */
 /*
-   Copyright (C) 2005 Kern Sibbald
+   Copyright (C) 2006 Kern Sibbald
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
@@ -45,6 +45,9 @@ typedef struct Digest DIGEST;
 /* Opaque Message Signature Structure */
 typedef struct Signature SIGNATURE;
 
+/* Opaque PKI Symmetric Key Data Structure */
+typedef struct Crypto_Recipients CRYPTO_RECIPIENTS;
+
 /* PEM Decryption Passphrase Callback */
 typedef int (CRYPTO_PEM_PASSWD_CB) (char *buf, int size, const void *userdata);
 
@@ -58,6 +61,15 @@ typedef enum {
    CRYPTO_DIGEST_SHA512 = 4
 } crypto_digest_t;
 
+/* Cipher Types */
+typedef enum {
+   /* These are not stored on disk */
+   CRYPTO_CIPHER_AES_128_CBC,
+   CRYPTO_CIPHER_AES_192_CBC,
+   CRYPTO_CIPHER_AES_256_CBC,
+   CRYPTO_CIPHER_BLOWFISH_CBC
+} crypto_cipher_t;
+
 /* Crypto API Errors */
 typedef enum {
    CRYPTO_ERROR_NONE           = 0, /* No error */
@@ -85,8 +97,8 @@ typedef enum {
  * This must be kept in sync with the available message digest algorithms.
  * Just in case someone forgets, I've added assertions
  * to crypto_digest_finalize().
- *     MD5: 128 bits
- *     SHA-1: 160 bits
+ *      MD5: 128 bits
+ *      SHA-1: 160 bits
  */
 #ifndef HAVE_SHA2
 #define CRYPTO_DIGEST_MAX_SIZE CRYPTO_DIGEST_SHA1_SIZE