VirtualBox

source: vbox/trunk/src/libs/openssl-3.0.7/include/crypto/sm4.h@ 98133

最後變更 在這個檔案從98133是 97984,由 vboxsync 提交於 2 年 前

libs/openssl-3.0.7: Shut up pragma once warnings for internal headers. Added sed script for doing that. bugref:10317

檔案大小: 1.2 KB
 
1/*
2 * Copyright 2017-2021 The OpenSSL Project Authors. All Rights Reserved.
3 * Copyright 2017 Ribose Inc. All Rights Reserved.
4 *
5 * Licensed under the Apache License 2.0 (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# ifndef RT_WITHOUT_PRAGMA_ONCE /* VBOX */
14# pragma once
15# endif /* VBOX */
16
17# include <openssl/opensslconf.h>
18# include <openssl/e_os2.h>
19
20# ifdef OPENSSL_NO_SM4
21# error SM4 is disabled.
22# endif
23
24# define SM4_ENCRYPT 1
25# define SM4_DECRYPT 0
26
27# define SM4_BLOCK_SIZE 16
28# define SM4_KEY_SCHEDULE 32
29
30typedef struct SM4_KEY_st {
31 uint32_t rk[SM4_KEY_SCHEDULE];
32} SM4_KEY;
33
34int ossl_sm4_set_key(const uint8_t *key, SM4_KEY *ks);
35
36void ossl_sm4_encrypt(const uint8_t *in, uint8_t *out, const SM4_KEY *ks);
37
38void ossl_sm4_decrypt(const uint8_t *in, uint8_t *out, const SM4_KEY *ks);
39
40#endif
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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