File indexing completed on 2025-11-04 10:20:18
0001 
0002 
0003 
0004 
0005 
0006 
0007 
0008 
0009 
0010 #ifndef OPENSSL_CAST_H
0011 # define OPENSSL_CAST_H
0012 # pragma once
0013 
0014 # include <openssl/macros.h>
0015 # ifndef OPENSSL_NO_DEPRECATED_3_0
0016 #  define HEADER_CAST_H
0017 # endif
0018 
0019 # include <openssl/opensslconf.h>
0020 
0021 # ifndef OPENSSL_NO_CAST
0022 # ifdef  __cplusplus
0023 extern "C" {
0024 # endif
0025 
0026 # define CAST_BLOCK      8
0027 # define CAST_KEY_LENGTH 16
0028 
0029 # ifndef OPENSSL_NO_DEPRECATED_3_0
0030 
0031 #  define CAST_ENCRYPT    1
0032 #  define CAST_DECRYPT    0
0033 
0034 #  define CAST_LONG unsigned int
0035 
0036 typedef struct cast_key_st {
0037     CAST_LONG data[32];
0038     int short_key;              
0039 } CAST_KEY;
0040 
0041 # endif 
0042 # ifndef OPENSSL_NO_DEPRECATED_3_0
0043 OSSL_DEPRECATEDIN_3_0
0044 void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data);
0045 OSSL_DEPRECATEDIN_3_0
0046 void CAST_ecb_encrypt(const unsigned char *in, unsigned char *out,
0047                       const CAST_KEY *key, int enc);
0048 OSSL_DEPRECATEDIN_3_0
0049 void CAST_encrypt(CAST_LONG *data, const CAST_KEY *key);
0050 OSSL_DEPRECATEDIN_3_0
0051 void CAST_decrypt(CAST_LONG *data, const CAST_KEY *key);
0052 OSSL_DEPRECATEDIN_3_0
0053 void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out,
0054                       long length, const CAST_KEY *ks, unsigned char *iv,
0055                       int enc);
0056 OSSL_DEPRECATEDIN_3_0
0057 void CAST_cfb64_encrypt(const unsigned char *in, unsigned char *out,
0058                         long length, const CAST_KEY *schedule,
0059                         unsigned char *ivec, int *num, int enc);
0060 OSSL_DEPRECATEDIN_3_0
0061 void CAST_ofb64_encrypt(const unsigned char *in, unsigned char *out,
0062                         long length, const CAST_KEY *schedule,
0063                         unsigned char *ivec, int *num);
0064 # endif
0065 
0066 # ifdef  __cplusplus
0067 }
0068 # endif
0069 # endif
0070 
0071 #endif