VirtualBox

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

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

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

檔案大小: 946 位元組
 
1/*
2 * Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
3 * Copyright 2017 Ribose Inc. All Rights Reserved.
4 *
5 * Licensed under the OpenSSL license (the "License"). You may not use
6 * this file except in compliance with the License. You can obtain a copy
7 * in the file LICENSE in the source distribution or at
8 * https://www.openssl.org/source/license.html
9 */
10
11#ifndef OSSL_CRYPTO_SM4_H
12# define OSSL_CRYPTO_SM4_H
13
14# include <openssl/opensslconf.h>
15# include <openssl/e_os2.h>
16
17# ifdef OPENSSL_NO_SM4
18# error SM4 is disabled.
19# endif
20
21# define SM4_ENCRYPT 1
22# define SM4_DECRYPT 0
23
24# define SM4_BLOCK_SIZE 16
25# define SM4_KEY_SCHEDULE 32
26
27typedef struct SM4_KEY_st {
28 uint32_t rk[SM4_KEY_SCHEDULE];
29} SM4_KEY;
30
31int SM4_set_key(const uint8_t *key, SM4_KEY *ks);
32
33void SM4_encrypt(const uint8_t *in, uint8_t *out, const SM4_KEY *ks);
34
35void SM4_decrypt(const uint8_t *in, uint8_t *out, const SM4_KEY *ks);
36
37#endif
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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