Blame include/openssl/cast.h

Packit c4476c
/*
Packit c4476c
 * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
Packit c4476c
 *
Packit c4476c
 * Licensed under the OpenSSL license (the "License").  You may not use
Packit c4476c
 * this file except in compliance with the License.  You can obtain a copy
Packit c4476c
 * in the file LICENSE in the source distribution or at
Packit c4476c
 * https://www.openssl.org/source/license.html
Packit c4476c
 */
Packit c4476c
Packit c4476c
#ifndef HEADER_CAST_H
Packit c4476c
# define HEADER_CAST_H
Packit c4476c
Packit c4476c
# include <openssl/opensslconf.h>
Packit c4476c
Packit c4476c
# ifndef OPENSSL_NO_CAST
Packit c4476c
# ifdef  __cplusplus
Packit c4476c
extern "C" {
Packit c4476c
# endif
Packit c4476c
Packit c4476c
# define CAST_ENCRYPT    1
Packit c4476c
# define CAST_DECRYPT    0
Packit c4476c
Packit c4476c
# define CAST_LONG unsigned int
Packit c4476c
Packit c4476c
# define CAST_BLOCK      8
Packit c4476c
# define CAST_KEY_LENGTH 16
Packit c4476c
Packit c4476c
typedef struct cast_key_st {
Packit c4476c
    CAST_LONG data[32];
Packit c4476c
    int short_key;              /* Use reduced rounds for short key */
Packit c4476c
} CAST_KEY;
Packit c4476c
Packit c4476c
void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data);
Packit c4476c
void CAST_ecb_encrypt(const unsigned char *in, unsigned char *out,
Packit c4476c
                      const CAST_KEY *key, int enc);
Packit c4476c
void CAST_encrypt(CAST_LONG *data, const CAST_KEY *key);
Packit c4476c
void CAST_decrypt(CAST_LONG *data, const CAST_KEY *key);
Packit c4476c
void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out,
Packit c4476c
                      long length, const CAST_KEY *ks, unsigned char *iv,
Packit c4476c
                      int enc);
Packit c4476c
void CAST_cfb64_encrypt(const unsigned char *in, unsigned char *out,
Packit c4476c
                        long length, const CAST_KEY *schedule,
Packit c4476c
                        unsigned char *ivec, int *num, int enc);
Packit c4476c
void CAST_ofb64_encrypt(const unsigned char *in, unsigned char *out,
Packit c4476c
                        long length, const CAST_KEY *schedule,
Packit c4476c
                        unsigned char *ivec, int *num);
Packit c4476c
Packit c4476c
# ifdef  __cplusplus
Packit c4476c
}
Packit c4476c
# endif
Packit c4476c
# endif
Packit c4476c
Packit c4476c
#endif