diff options
Diffstat (limited to 'src/include/openssl/cipher.h')
-rw-r--r-- | src/include/openssl/cipher.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/include/openssl/cipher.h b/src/include/openssl/cipher.h index 0dfd97b..b614333 100644 --- a/src/include/openssl/cipher.h +++ b/src/include/openssl/cipher.h @@ -484,6 +484,42 @@ typedef struct evp_cipher_info_st { unsigned char iv[EVP_MAX_IV_LENGTH]; } EVP_CIPHER_INFO; +struct evp_cipher_st { + /* type contains a NID identifing the cipher. (For example, NID_rc4.) */ + int nid; + + /* block_size contains the block size, in bytes, of the cipher, or 1 for a + * stream cipher. */ + unsigned block_size; + + /* key_len contains the key size, in bytes, for the cipher. If the cipher + * takes a variable key size then this contains the default size. */ + unsigned key_len; + + /* iv_len contains the IV size, in bytes, or zero if inapplicable. */ + unsigned iv_len; + + /* ctx_size contains the size, in bytes, of the per-key context for this + * cipher. */ + unsigned ctx_size; + + /* flags contains the OR of a number of flags. See |EVP_CIPH_*|. */ + uint32_t flags; + + /* app_data is a pointer to opaque, user data. */ + void *app_data; + + int (*init)(EVP_CIPHER_CTX *ctx, const uint8_t *key, const uint8_t *iv, + int enc); + + int (*cipher)(EVP_CIPHER_CTX *ctx, uint8_t *out, const uint8_t *in, + size_t inl); + + int (*cleanup)(EVP_CIPHER_CTX *); + + int (*ctrl)(EVP_CIPHER_CTX *, int type, int arg, void *ptr); +}; + /* Android compatibility section. * |