VirtualBox

source: vbox/trunk/src/libs/openssl-3.0.1/include/openssl/blowfish.h@ 94081

最後變更 在這個檔案從94081是 91772,由 vboxsync 提交於 3 年 前

openssl-1.1.1l: Applied and adjusted our OpenSSL changes to 1.1.1l. bugref:10126

檔案大小: 1.8 KB
 
1/*
2 * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
3 *
4 * Licensed under the OpenSSL license (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
8 */
9
10#ifndef HEADER_BLOWFISH_H
11# define HEADER_BLOWFISH_H
12
13# include <openssl/opensslconf.h>
14
15# ifndef OPENSSL_NO_BF
16# include <openssl/e_os2.h>
17# ifdef __cplusplus
18extern "C" {
19# endif
20
21# define BF_ENCRYPT 1
22# define BF_DECRYPT 0
23
24/*-
25 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
26 * ! BF_LONG has to be at least 32 bits wide. !
27 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
28 */
29# define BF_LONG unsigned int
30
31# define BF_ROUNDS 16
32# define BF_BLOCK 8
33
34typedef struct bf_key_st {
35 BF_LONG P[BF_ROUNDS + 2];
36 BF_LONG S[4 * 256];
37} BF_KEY;
38
39void BF_set_key(BF_KEY *key, int len, const unsigned char *data);
40
41void BF_encrypt(BF_LONG *data, const BF_KEY *key);
42void BF_decrypt(BF_LONG *data, const BF_KEY *key);
43
44void BF_ecb_encrypt(const unsigned char *in, unsigned char *out,
45 const BF_KEY *key, int enc);
46void BF_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,
47 const BF_KEY *schedule, unsigned char *ivec, int enc);
48void BF_cfb64_encrypt(const unsigned char *in, unsigned char *out,
49 long length, const BF_KEY *schedule,
50 unsigned char *ivec, int *num, int enc);
51void BF_ofb64_encrypt(const unsigned char *in, unsigned char *out,
52 long length, const BF_KEY *schedule,
53 unsigned char *ivec, int *num);
54const char *BF_options(void);
55
56# ifdef __cplusplus
57}
58# endif
59# endif
60
61#endif
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette