File indexing completed on 2025-01-18 10:05:49
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035 #ifndef OPENSSL_SEED_H
0036 # define OPENSSL_SEED_H
0037 # pragma once
0038
0039 # include <openssl/macros.h>
0040 # ifndef OPENSSL_NO_DEPRECATED_3_0
0041 # define HEADER_SEED_H
0042 # endif
0043
0044 # include <openssl/opensslconf.h>
0045
0046 # ifndef OPENSSL_NO_SEED
0047 # include <openssl/e_os2.h>
0048 # include <openssl/crypto.h>
0049 # include <sys/types.h>
0050
0051 # ifdef __cplusplus
0052 extern "C" {
0053 # endif
0054
0055 # define SEED_BLOCK_SIZE 16
0056 # define SEED_KEY_LENGTH 16
0057
0058 # ifndef OPENSSL_NO_DEPRECATED_3_0
0059
0060 # ifdef AES_LONG
0061 # ifndef SEED_LONG
0062 # define SEED_LONG 1
0063 # endif
0064 # endif
0065
0066
0067 typedef struct seed_key_st {
0068 # ifdef SEED_LONG
0069 unsigned long data[32];
0070 # else
0071 unsigned int data[32];
0072 # endif
0073 } SEED_KEY_SCHEDULE;
0074 # endif
0075 # ifndef OPENSSL_NO_DEPRECATED_3_0
0076 OSSL_DEPRECATEDIN_3_0
0077 void SEED_set_key(const unsigned char rawkey[SEED_KEY_LENGTH],
0078 SEED_KEY_SCHEDULE *ks);
0079 OSSL_DEPRECATEDIN_3_0
0080 void SEED_encrypt(const unsigned char s[SEED_BLOCK_SIZE],
0081 unsigned char d[SEED_BLOCK_SIZE],
0082 const SEED_KEY_SCHEDULE *ks);
0083 OSSL_DEPRECATEDIN_3_0
0084 void SEED_decrypt(const unsigned char s[SEED_BLOCK_SIZE],
0085 unsigned char d[SEED_BLOCK_SIZE],
0086 const SEED_KEY_SCHEDULE *ks);
0087 OSSL_DEPRECATEDIN_3_0
0088 void SEED_ecb_encrypt(const unsigned char *in,
0089 unsigned char *out,
0090 const SEED_KEY_SCHEDULE *ks, int enc);
0091 OSSL_DEPRECATEDIN_3_0
0092 void SEED_cbc_encrypt(const unsigned char *in, unsigned char *out, size_t len,
0093 const SEED_KEY_SCHEDULE *ks,
0094 unsigned char ivec[SEED_BLOCK_SIZE],
0095 int enc);
0096 OSSL_DEPRECATEDIN_3_0
0097 void SEED_cfb128_encrypt(const unsigned char *in, unsigned char *out,
0098 size_t len, const SEED_KEY_SCHEDULE *ks,
0099 unsigned char ivec[SEED_BLOCK_SIZE],
0100 int *num, int enc);
0101 OSSL_DEPRECATEDIN_3_0
0102 void SEED_ofb128_encrypt(const unsigned char *in, unsigned char *out,
0103 size_t len, const SEED_KEY_SCHEDULE *ks,
0104 unsigned char ivec[SEED_BLOCK_SIZE],
0105 int *num);
0106 # endif
0107
0108 # ifdef __cplusplus
0109 }
0110 # endif
0111 # endif
0112
0113 #endif