Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:48

0001 /*
0002  * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
0003  *
0004  * Licensed under the Apache License 2.0 (the "License").  You may not use
0005  * this file except in compliance with the License.  You can obtain a copy
0006  * in the file LICENSE in the source distribution or at
0007  * https://www.openssl.org/source/license.html
0008  */
0009 
0010 #ifndef OPENSSL_RC2_H
0011 # define OPENSSL_RC2_H
0012 # pragma once
0013 
0014 # include <openssl/macros.h>
0015 # ifndef OPENSSL_NO_DEPRECATED_3_0
0016 #  define HEADER_RC2_H
0017 # endif
0018 
0019 # include <openssl/opensslconf.h>
0020 
0021 # ifndef OPENSSL_NO_RC2
0022 #  ifdef  __cplusplus
0023 extern "C" {
0024 #  endif
0025 
0026 #  define RC2_BLOCK       8
0027 #  define RC2_KEY_LENGTH  16
0028 
0029 #  ifndef OPENSSL_NO_DEPRECATED_3_0
0030 typedef unsigned int RC2_INT;
0031 
0032 #   define RC2_ENCRYPT     1
0033 #   define RC2_DECRYPT     0
0034 
0035 typedef struct rc2_key_st {
0036     RC2_INT data[64];
0037 } RC2_KEY;
0038 #  endif
0039 #  ifndef OPENSSL_NO_DEPRECATED_3_0
0040 OSSL_DEPRECATEDIN_3_0 void RC2_set_key(RC2_KEY *key, int len,
0041                                        const unsigned char *data, int bits);
0042 OSSL_DEPRECATEDIN_3_0 void RC2_ecb_encrypt(const unsigned char *in,
0043                                            unsigned char *out, RC2_KEY *key,
0044                                            int enc);
0045 OSSL_DEPRECATEDIN_3_0 void RC2_encrypt(unsigned long *data, RC2_KEY *key);
0046 OSSL_DEPRECATEDIN_3_0 void RC2_decrypt(unsigned long *data, RC2_KEY *key);
0047 OSSL_DEPRECATEDIN_3_0 void RC2_cbc_encrypt(const unsigned char *in,
0048                                            unsigned char *out, long length,
0049                                            RC2_KEY *ks, unsigned char *iv,
0050                                            int enc);
0051 OSSL_DEPRECATEDIN_3_0 void RC2_cfb64_encrypt(const unsigned char *in,
0052                                              unsigned char *out, long length,
0053                                              RC2_KEY *schedule,
0054                                              unsigned char *ivec,
0055                                              int *num, int enc);
0056 OSSL_DEPRECATEDIN_3_0 void RC2_ofb64_encrypt(const unsigned char *in,
0057                                              unsigned char *out, long length,
0058                                              RC2_KEY *schedule,
0059                                              unsigned char *ivec,
0060                                              int *num);
0061 #  endif
0062 
0063 #  ifdef  __cplusplus
0064 }
0065 #  endif
0066 # endif
0067 
0068 #endif