codekingpro/portable-devtools
115k
1/*2 * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.3 *4 * Licensed under the Apache License 2.0 (the "License"). You may not use5 * this file except in compliance with the License. You can obtain a copy6 * in the file LICENSE in the source distribution or at7 * https://www.openssl.org/source/license.html8 */9 10#ifndef OPENSSL_IDEA_H11# define OPENSSL_IDEA_H12# pragma once13 14# include <openssl/macros.h>15# ifndef OPENSSL_NO_DEPRECATED_3_016# define HEADER_IDEA_H17# endif18 19# include <openssl/opensslconf.h>20 21# ifndef OPENSSL_NO_IDEA22# ifdef __cplusplus23extern "C" {24# endif25 26# define IDEA_BLOCK 827# define IDEA_KEY_LENGTH 1628 29# ifndef OPENSSL_NO_DEPRECATED_3_030 31typedef unsigned int IDEA_INT;32 33# define IDEA_ENCRYPT 134# define IDEA_DECRYPT 035 36typedef struct idea_key_st {37 IDEA_INT data[9][6];38} IDEA_KEY_SCHEDULE;39#endif40#ifndef OPENSSL_NO_DEPRECATED_3_041OSSL_DEPRECATEDIN_3_0 const char *IDEA_options(void);42OSSL_DEPRECATEDIN_3_0 void IDEA_ecb_encrypt(const unsigned char *in,43 unsigned char *out,44 IDEA_KEY_SCHEDULE *ks);45OSSL_DEPRECATEDIN_3_0 void IDEA_set_encrypt_key(const unsigned char *key,46 IDEA_KEY_SCHEDULE *ks);47OSSL_DEPRECATEDIN_3_0 void IDEA_set_decrypt_key(IDEA_KEY_SCHEDULE *ek,48 IDEA_KEY_SCHEDULE *dk);49OSSL_DEPRECATEDIN_3_0 void IDEA_cbc_encrypt(const unsigned char *in,50 unsigned char *out, long length,51 IDEA_KEY_SCHEDULE *ks,52 unsigned char *iv, int enc);53OSSL_DEPRECATEDIN_3_0 void IDEA_cfb64_encrypt(const unsigned char *in,54 unsigned char *out, long length,55 IDEA_KEY_SCHEDULE *ks,56 unsigned char *iv, int *num,57 int enc);58OSSL_DEPRECATEDIN_3_0 void IDEA_ofb64_encrypt(const unsigned char *in,59 unsigned char *out, long length,60 IDEA_KEY_SCHEDULE *ks,61 unsigned char *iv, int *num);62OSSL_DEPRECATEDIN_3_0 void IDEA_encrypt(unsigned long *in,63 IDEA_KEY_SCHEDULE *ks);64#endif65 66# ifndef OPENSSL_NO_DEPRECATED_1_1_067# define idea_options IDEA_options68# define idea_ecb_encrypt IDEA_ecb_encrypt69# define idea_set_encrypt_key IDEA_set_encrypt_key70# define idea_set_decrypt_key IDEA_set_decrypt_key71# define idea_cbc_encrypt IDEA_cbc_encrypt72# define idea_cfb64_encrypt IDEA_cfb64_encrypt73# define idea_ofb64_encrypt IDEA_ofb64_encrypt74# define idea_encrypt IDEA_encrypt75# endif76 77# ifdef __cplusplus78}79# endif80# endif81 82#endif83 