File indexing completed on 2026-09-24 09:18:04
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 typedef struct seed_key_st {
0067 #ifdef SEED_LONG
0068 unsigned long data[32];
0069 #else
0070 unsigned int data[32];
0071 #endif
0072 } SEED_KEY_SCHEDULE;
0073 #endif
0074 #ifndef OPENSSL_NO_DEPRECATED_3_0
0075 OSSL_DEPRECATEDIN_3_0
0076 void SEED_set_key(const unsigned char rawkey[SEED_KEY_LENGTH],
0077 SEED_KEY_SCHEDULE *ks);
0078 OSSL_DEPRECATEDIN_3_0
0079 void SEED_encrypt(const unsigned char s[SEED_BLOCK_SIZE],
0080 unsigned char d[SEED_BLOCK_SIZE],
0081 const SEED_KEY_SCHEDULE *ks);
0082 OSSL_DEPRECATEDIN_3_0
0083 void SEED_decrypt(const unsigned char s[SEED_BLOCK_SIZE],
0084 unsigned char d[SEED_BLOCK_SIZE],
0085 const SEED_KEY_SCHEDULE *ks);
0086 OSSL_DEPRECATEDIN_3_0
0087 void SEED_ecb_encrypt(const unsigned char *in,
0088 unsigned char *out,
0089 const SEED_KEY_SCHEDULE *ks, int enc);
0090 OSSL_DEPRECATEDIN_3_0
0091 void SEED_cbc_encrypt(const unsigned char *in, unsigned char *out, size_t len,
0092 const SEED_KEY_SCHEDULE *ks,
0093 unsigned char ivec[SEED_BLOCK_SIZE],
0094 int enc);
0095 OSSL_DEPRECATEDIN_3_0
0096 void SEED_cfb128_encrypt(const unsigned char *in, unsigned char *out,
0097 size_t len, const SEED_KEY_SCHEDULE *ks,
0098 unsigned char ivec[SEED_BLOCK_SIZE],
0099 int *num, int enc);
0100 OSSL_DEPRECATEDIN_3_0
0101 void SEED_ofb128_encrypt(const unsigned char *in, unsigned char *out,
0102 size_t len, const SEED_KEY_SCHEDULE *ks,
0103 unsigned char ivec[SEED_BLOCK_SIZE],
0104 int *num);
0105 #endif
0106
0107 #ifdef __cplusplus
0108 }
0109 #endif
0110 #endif
0111
0112 #endif