openssl AF_ALG引擎使用

cmd

AF_ALG是Linux提供的一种虚拟接口,用于访问内核中的加密算法。在Linux中,可以使用AF_ALG接口配合加密算法框架(Crypto API)来进行加密操作。

以下是一个使用AF_ALG和openssl进行加密操作的例子:

# 加密
openssl engine -t afalg -k afalg -c# 加载AF_ALG引擎
openssl engine afalg# 设置会话使用的加密算法和密钥
openssl ciphers -v 'aes-128-cbc'# 加密文件
openssl enc -engine afalg -aes-128-cbc -in input.txt -out output.txt -pass pass:YOUR_PASSWORD

在这个例子中,我们首先加载AF_ALG加密引擎。然后,我们设置会话使用的加密算法为AES-128-CBC。最后,我们使用openssl的enc命令进行加密操作,指定输入文件input.txt和输出文件output.txt,并使用密钥mysecretkey进行加密。

注意:在使用AF_ALG引擎之前,你需要确保系统中已经安装了libafalg-dev包,并且你的内核支持AF_ALG。

这只是一个基本的示例,实际使用时可能需要根据具体的加密算法和系统配置进行调整。

测试实例:(这是在101编译服务器环境上测试的)

der@somewhere:~/tmp/tmp$ openssl engine -t afalg -k afalg -c
engine: Cannot mix flags and engine names.
engine: Use -help for summary.
der@somewhere:~/tmp/tmp$ openssl engine -t afalg -k afalg
engine: Cannot mix flags and engine names.
engine: Use -help for summary.
der@somewhere:~/tmp/tmp$ openssl engine -t afalg
(afalg) AFALG engine support[ available ]
der@somewhere:~/tmp/tmp$ 
der@somewhere:~/tmp/tmp$ 
der@somewhere:~/tmp/tmp$ openssl engines
Invalid command 'engines'; type "help" for a list.
der@somewhere:~/tmp/tmp$ openssl engine
(rdrand) Intel RDRAND engine
(dynamic) Dynamic engine loading support
der@somewhere:~/tmp/tmp$ openssl engine afalg
(afalg) AFALG engine support
der@somewhere:~/tmp/tmp$ openssl ciphers -v 'aes-128-cbc'
TLS_AES_256_GCM_SHA384  TLSv1.3 Kx=any      Au=any  Enc=AESGCM(256) Mac=AEAD
TLS_CHACHA20_POLY1305_SHA256 TLSv1.3 Kx=any      Au=any  Enc=CHACHA20/POLY1305(256) Mac=AEAD
TLS_AES_128_GCM_SHA256  TLSv1.3 Kx=any      Au=any  Enc=AESGCM(128) Mac=AEAD
der@somewhere:~/tmp/tmp$
der@somewhere:~/tmp/tmp$ find /usr/lib -name "*afalg*"
/usr/lib/x86_64-linux-gnu/engines-1.1/afalg.so
der@somewhere:~/tmp/tmp$
der@somewhere:~/tmp/tmp$ openssl enc -engine afalg -aes-128-cbc -in info.txt -out output.txt
engine "afalg" set.
enter aes-128-cbc encryption password:
Verifying - enter aes-128-cbc encryption password:
*** WARNING : deprecated key derivation used.
Using -iter or -pbkdf2 would be better.
der@somewhere:~/tmp/tmp$
der@somewhere:~/tmp/tmp$ 
der@somewhere:~/tmp/tmp$ openssl enc -d -engine afalg -aes-128-cbc -in output.txt -out dec.txt -pass pass:somepasswd
engine "afalg" set.
*** WARNING : deprecated key derivation used.
Using -iter or -pbkdf2 would be better.
der@somewhere:~/tmp/tmp$ 
der@somewhere:~/tmp/tmp$ md5sum info.txt dec.txt 
c50829378ad3f6ad668b290ef8b17cc4  info.txt
c50829378ad3f6ad668b290ef8b17cc4  dec.txt
der@somewhere:~/tmp/tmp$

code

加载

int main() {int ret = 1;int type = 0;do{printf("please choose type: 0:exit 1:load_builtin, 2:init_crypto AFALG, 3:init_crypto DYNAMIC, 4:add_all_algorithms\n");(void)scanf(" %d",&type);switch(type){case 0:return 0;case 1:ENGINE_load_builtin_engines();break;case 2:OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_AFALG, NULL);break;case 3:OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_DYNAMIC, NULL);break;case 4:OpenSSL_add_all_algorithms();break;}ENGINE *e = ENGINE_by_id("afalg");if (e == NULL) {printf("Can not load AFALG engine.\n");continue;}printf("Load AFALG engine OK.\n");int rc = ENGINE_init(e);if (rc == 0) {printf("Init AFALG engine fail.\n");ENGINE_free(e);continue;}printf("Init AFALG engine OK.\n");//now we can use afalg engine

第1种第3种可以加载,2,4种不行

使用

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <openssl/evp.h>
#include <openssl/engine.h>// colors used in printf
#define COLOR_NONE "\033[m"
#define COLOR_RED "\033[0;32;31m"
#define COLOR_LIGHT_RED "\033[1;31m"
#define COLOR_YELLOW "\033[1;33m"
#define COLOR_GREEN "\033[0;32;32m"
#define COLOR_BLUE "\033[0;32;34m"
#define COLOR_PURPLE "\033[0;32;35m"// switch of printf
#if 1
#define PRINT(...) printf(__VA_ARGS__)
#else
#define PRINT(...)
#endif#if 0
#define PRINTSUCCESS(...) printf(__VA_ARGS__)
#else
#define PRINTSUCCESS(...)
#endif#if 1
#define PRINTFAIL(...) printf(__VA_ARGS__)
#else
#define PRINTFAIL(...)
#endif// macros related to break
#define FREE_NOTNULL(ptr, func_name) \{                                \if (ptr != NULL)             \{                            \func_name(ptr);          \ptr = NULL;              \}                            \}#define CALL_FUNC(ret, funSentence, errCase)                                                                     \{                                                                                                            \ret = funSentence;                                                                                       \if (errCase)                                                                                             \{                                                                                                        \PRINTFAIL(COLOR_RED "[%s][%d] " #funSentence " fail:" #errCase "\n" COLOR_NONE, __FILE__, __LINE__); \break;                                                                                               \}                                                                                                        \else                                                                                                     \{                                                                                                        \PRINTSUCCESS(COLOR_GREEN "[%s][%d] " #funSentence " success\n" COLOR_NONE, __FILE__, __LINE__);      \}                                                                                                        \}#define CALL_FUNC_WITHIOUTBREAK(ret, funSentence, errCase)                                                       \{                                                                                                            \ret = funSentence;                                                                                       \if (errCase)                                                                                             \{                                                                                                        \PRINTFAIL(COLOR_RED "[%s][%d] " #funSentence " fail:" #errCase "\n" COLOR_NONE, __FILE__, __LINE__); \}                                                                                                        \else                                                                                                     \{                                                                                                        \PRINTSUCCESS(COLOR_GREEN "[%s][%d] " #funSentence " success\n" COLOR_NONE, __FILE__, __LINE__);      \}                                                                                                        \}#define CALL_FUNC_NOTNULL(ret, funSentence) \CALL_FUNC(ret, funSentence, ret == NULL)#define CALL_FUNC_POSITIVE(ret, funSentence) \CALL_FUNC(ret, funSentence, ret <= 0)#define CALL_NBFUNC_NOTNULL(ret, funSentence) \CALL_FUNC_WITHIOUTBREAK(ret, funSentence, ret == NULL)#define CALL_NBFUNC_POSITIVE(ret, funSentence) \CALL_FUNC_WITHIOUTBREAK(ret, funSentence, ret <= 0)#define BUFFER_SIZE 256static void print_hex(const char *info, unsigned char *data, unsigned int len)
{printf("%s[len:%d | 0x%x]\n", info, len, len);for (int i = 0; i < len; i++){printf("%02x ", data[i]);}printf("\n");
}static int test_afalg_aes_cbc(ENGINE *engine)
{EVP_CIPHER_CTX *ctx = NULL;const EVP_CIPHER *cipher;unsigned char key[] = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b""\x51\x2e\x03\xd5\x34\x12\x00\x06""\x06\xa9\x21\x40\x36\xb8\xa1\x5b""\x51\x2e\x03\xd5\x34\x12\x00\x06";unsigned char iv[] = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30""\xb4\x22\xda\x80\x2c\x9f\xac\x41";/* input = "Single block msg\n"  17Bytes*/unsigned char in[BUFFER_SIZE] = "\x53\x69\x6e\x67\x6c\x65\x20\x62""\x6c\x6f\x63\x6b\x20\x6d\x73\x67\x0a";unsigned char ebuf[BUFFER_SIZE + 32];unsigned char dbuf[BUFFER_SIZE + 32];unsigned char encresult_128[] = "\xe3\x53\x77\x9c\x10\x79\xae\xb8""\x27\x08\x94\x2d\xbe\x77\x18\x1a\x2d";unsigned char encresult_192[] = "\xf7\xe4\x26\xd1\xd5\x4f\x8f\x39""\xb1\x9e\xe0\xdf\x61\xb9\xc2\x55\xeb";unsigned char encresult_256[] = "\xa0\x76\x85\xfd\xc1\x65\x71\x9d""\xc7\xe9\x13\x6e\xae\x55\x49\xb4\x13";unsigned char *enc_result = NULL;int encl, encf, decl, decf;int ret = 0;int keysize_idx = 0;printf("please choose key len: 0:128, 1:192, 2:256 else:128\n");(void)scanf(" %d", &keysize_idx);do{switch (keysize_idx){case 0:cipher = EVP_aes_128_cbc();enc_result = &encresult_128[0];break;case 1:cipher = EVP_aes_192_cbc();enc_result = &encresult_192[0];break;case 2:cipher = EVP_aes_256_cbc();enc_result = &encresult_256[0];break;default:cipher = EVP_aes_128_cbc();enc_result = &encresult_128[0];break;}CALL_FUNC_NOTNULL(ctx, EVP_CIPHER_CTX_new())print_hex("src data", in, BUFFER_SIZE);CALL_FUNC_POSITIVE(ret, EVP_CipherInit_ex(ctx, cipher, engine, key, iv, 1))CALL_FUNC_POSITIVE(ret, EVP_CipherUpdate(ctx, ebuf, &encl, in, BUFFER_SIZE))CALL_FUNC_POSITIVE(ret, EVP_CipherFinal_ex(ctx, ebuf + encl, &encf))encl += encf;print_hex("enc data", ebuf, encl);// CALL_FUNC(ret,memcmp(enc_result, ebuf, BUFFER_SIZE),ret != 0)CALL_FUNC_POSITIVE(ret, EVP_CIPHER_CTX_reset(ctx))CALL_FUNC_POSITIVE(ret, EVP_CipherInit_ex(ctx, cipher, engine, key, iv, 0))CALL_FUNC_POSITIVE(ret, EVP_CipherUpdate(ctx, dbuf, &decl, ebuf, encl))CALL_FUNC_POSITIVE(ret, EVP_CipherFinal_ex(ctx, dbuf + decl, &decf))print_hex("dec data", dbuf, decl);decl += decf;CALL_FUNC_POSITIVE(ret, decl == BUFFER_SIZE)CALL_FUNC(ret, memcmp(dbuf, in, BUFFER_SIZE), ret != 0)printf("engine enc dec success.\n");ret = 1;} while (0);
end:FREE_NOTNULL(ctx, EVP_CIPHER_CTX_free)return ret;
}int test_engine_digest(ENGINE *engine)
{int ret = 0;const EVP_MD *md = NULL;EVP_MD_CTX *emctx = NULL;unsigned char data[128] = {1, 2, 4};unsigned char digestData[64] = {0};unsigned int digestSize = sizeof(digestData);const char *eName = NULL;do{CALL_FUNC_NOTNULL(eName, ENGINE_get_name(engine))printf("engine name:%s\n", eName);CALL_FUNC_POSITIVE(ret, ENGINE_register_digests(engine))               //CALL_FUNC_POSITIVE(ret, ENGINE_set_default(engine, ENGINE_METHOD_ALL)) // ENGINE_METHOD_DIGESTS))CALL_FUNC_NOTNULL(emctx, EVP_MD_CTX_new())CALL_FUNC_POSITIVE(ret, EVP_MD_CTX_init(emctx))CALL_FUNC_NOTNULL(md, EVP_md5())digestSize = sizeof(digestData);CALL_FUNC_POSITIVE(ret, EVP_DigestInit_ex(emctx, md, engine))CALL_FUNC_POSITIVE(ret, EVP_DigestUpdate(emctx, data, sizeof(data)))CALL_FUNC_POSITIVE(ret, EVP_DigestFinal(emctx, digestData, &digestSize))print_hex("MD5 3 segment result", digestData, digestSize);memset(digestData, 0, sizeof(digestData));digestSize = sizeof(digestData);// CALL_FUNC_POSITIVE(ret,EVP_DigestInit_ex(emctx,md,engine))CALL_FUNC_POSITIVE(ret, EVP_Digest(data, sizeof(data), digestData, &digestSize, md, engine))print_hex("MD5 1 segment result", digestData, digestSize);memset(digestData, 0, sizeof(digestData));digestSize = sizeof(digestData);CALL_FUNC_NOTNULL(md, EVP_sha1())CALL_FUNC_POSITIVE(ret, EVP_DigestInit_ex(emctx, md, engine))CALL_FUNC_POSITIVE(ret, EVP_DigestUpdate(emctx, data, sizeof(data)))CALL_FUNC_POSITIVE(ret, EVP_DigestFinal(emctx, digestData, &digestSize))print_hex("SHA1 3 segment result", digestData, digestSize);memset(digestData, 0, sizeof(digestData));digestSize = sizeof(digestData);CALL_FUNC_NOTNULL(md, EVP_sha256())CALL_FUNC_POSITIVE(ret, EVP_DigestInit_ex(emctx, md, engine))CALL_FUNC_POSITIVE(ret, EVP_DigestUpdate(emctx, data, sizeof(data)))CALL_FUNC_POSITIVE(ret, EVP_DigestFinal(emctx, digestData, &digestSize))print_hex("SHA256 3 segment result", digestData, digestSize);} while (0);// FREE_NOTNULL(md,EVP_md5xx) //do not need freeFREE_NOTNULL(emctx, EVP_MD_CTX_free)return ret;
}int main()
{int ret = 1;int type = 0;do{printf("please choose type: 0:exit 1:load_builtin, 2:init_crypto AFALG, 3:init_crypto DYNAMIC, 4:add_all_algorithms\n");(void)scanf(" %d", &type);switch (type){case 0:return 0;case 1:ENGINE_load_builtin_engines();break;case 2:OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_AFALG, NULL);break;case 3:OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_DYNAMIC, NULL);break;case 4:OpenSSL_add_all_algorithms();break;}ENGINE *e = ENGINE_by_id("afalg");if (e == NULL){printf("Can not load AFALG engine.\n");continue;}printf("Load AFALG engine OK.\n");int rc = ENGINE_init(e);if (rc == 0){printf("Init AFALG engine fail.\n");ENGINE_free(e);continue;}printf("Init AFALG engine OK.\n");// now we can use afalg engineCALL_FUNC_POSITIVE(ret, test_afalg_aes_cbc(e))CALL_FUNC_POSITIVE(ret, test_engine_digest(e))// ENGINE_free(e);ENGINE_finish(e);} while (type != 0);return 0;
}
der@somewhere:~/tmp/tmp/engine$ gcc -o engine engine.c -lcrypto
der@somewhere:~/tmp/tmp/engine$ ./engine 
please choose type: 0:exit 1:load_builtin, 2:init_crypto AFALG, 3:init_crypto DYNAMIC, 4:add_all_algorithms
3
Load AFALG engine OK.
Init AFALG engine OK.
please choose key len: 0:128, 1:192, 2:256 else:128
2
src data[len:256 | 0x100]
53 69 6e 67 6c 65 20 62 6c 6f 63 6b 20 6d 73 67 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
enc data[len:272 | 0x110]
a0 76 85 fd c1 65 71 9d c7 e9 13 6e ae 55 49 b4 ca 9f 86 f1 4f 52 d9 66 6c a1 f9 25 ae 42 c6 d9 e6 f2 15 3a 08 14 c2 e0 02 06 de e2 c1 45 ba 02 dc 36 85 a8 2e 74 a3 68 b8 96 69 0f 78 59 34 50 77 85 24 00 f1 54 ea 9f 75 b7 61 c1 db a1 ad b3 3b b5 c1 c9 77 9f f0 f8 fc 95 f1 36 17 34 c5 03 41 43 1e 6e 69 e8 e1 88 fb d1 ac 0c 46 6e 71 26 52 a3 91 b3 87 dc 6a 16 e4 02 a8 a4 8b 4c 6a c1 ef 5d 92 3b ab 43 cc 80 34 5a c6 52 c6 48 8b a0 f5 14 12 85 55 78 92 80 30 5f f9 45 e1 fe 61 e9 02 da a1 69 19 a1 92 16 87 f2 a3 8d e3 e8 15 34 69 c2 40 69 2b 15 43 27 da 4e 56 15 d3 10 e5 55 58 8c d0 0e ee 2b 3f 00 57 e8 65 7f ac d5 01 af 9a 13 1a c0 ae ac b1 a8 01 46 f7 15 2d 26 22 b1 87 a0 ee db a3 fb 9d a3 94 77 91 e1 72 25 5e 9c 17 d6 d6 5f e9 3c 2f 0f bb be 79 1f 99 06 7e 37 68 67 9c 76 04 dc de e3 dc ed dd c9 32 fd dc 7d 
dec data[len:256 | 0x100]
53 69 6e 67 6c 65 20 62 6c 6f 63 6b 20 6d 73 67 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
engine enc dec success.
engine name:AFALG engine support
[engine.c][197] EVP_DigestInit_ex(emctx,md,engine) fail:ret <= 0
[engine.c][271] test_engine_digest(e) fail:ret <= 0
der@somewhere:~/tmp/tmp/engine$ 
der@somewhere:~/tmp/tmp/engine$

可以看到aes使用afalg引擎成功,但是digest使用引擎失败了。之前好像看到过说明,digest软算法很快,如果使用硬件加速引擎综合开销反而更大或者效率提升不明显,如果需要引擎支持digest需要编译openssl的时候指定相应标志。就这样。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/776133.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

smarteye server内置对多种第三方协议(28181/RTSP/RTMP)的输入、输出的支持

smarteye server内置支持了多种协议的输入转换、转换输出&#xff0c;包括GB28181、RTSP、RTMP等等。 目前smarteye server可支持的输入、输出的协议有&#xff1a;RTSP in/out, ONVIF in, RTMP in/out&#xff0c;GB28181 in/out。 常用的即smarteye server可作为国标28181…

最新海外投资理财源码 amazon多语言投资理财系统源码 区块链理财项目平台源码 共享充电宝系统

一款新UI的海外多语言刷单系统&#xff0c;支持后台在线添加订单派单、预约派单、余额宝等功能 源码下载&#xff1a;https://download.csdn.net/download/m0_66047725/88949885 更多资源下载&#xff1a;关注我。

LabVIEW单片机的废气再循环EGR检测系统

LabVIEW单片机的废气再循环EGR检测系统 实现了一种基于LabVIEW和STM32F103VET6单片机的EGR&#xff08;废气再循环&#xff09;检测系统&#xff0c;监测和控制船用二冲程柴油机的EGR运行状态。通过替代传统的NI采集卡&#xff0c;系统不仅降低了成本&#xff0c;同时也提升了数…

ROS2从入门到精通0-4:ROS2核心架构与常用指令大全

目录 0 专栏介绍1 ROS2核心架构1.1 工作空间1.2 功能包 2 ROS2常用指令2.1 功能包相关2.2 节点运行相关2.3 话题相关2.4 参数相关2.4 录制包、播放包相关2.5 服务相关2.6 动作相关2.7 生命周期相关 0 专栏介绍 本专栏旨在通过对ROS2的系统学习&#xff0c;掌握ROS2底层基本分布…

DP4301-M无线模块一款SUB-1G无线收发模块

DP4301-M无线模块是一款低成本高效率工作于1GHz以内的收发模块&#xff0c;支持中国智能电无线 集抄标准470MHz~ 510MHz&#xff0c;兼容433MHz ISM/SRD频段均可使用。 此模块且前已经超大量应用于国标智能无线抄表及物联网自组网等双向数据传输系统方案&#xff0c;模 块具备的…

Mybatis-获取参数值的两种方式

1. ${ } 和 #{ } MyBatis获取参数值的两种方式&#xff1a;${ } 和 #{ } 对于初学者来说&#xff0c;理解MyBatis中获取参数值的两种方式——#{}和${}&#xff0c;关键在于明白它们如何影响SQL语句的构建以及为何在安全性、灵活性上有显著差异。下面我将用简单易懂的语言来解…

康耐视visionpro-CogAcqFifoTool工具详细说明

CogAcqFifoTool操作说明&#xff1a; ① 打开工具栏&#xff0c;双击或点击鼠标拖拽 添加CogAcqFifoTool ②.从图片采集设备/图像采集卡列表里选择对应的相机&#xff0c;视频格式选择图像格式。 Mono表示黑白图像&#xff0c;RGB表示彩色相机。点击初始化取相初始化相机。 ③…

【元器件-电阻篇】0Ω电阻在电路中有什么作用

电路设计与调试过程中,我们很多时候要用到0Ω电阻(如下图),那么0Ω电阻到底在这过程中充当了什么样的角色呢? 0R电阻在电路中有什么作用? #创作灵感#:脑海存留的如下几点疑惑需要解开。 1、电路初次设计使用串接电阻为什么是0R电阻; 2、单板调试时为什么有时候会用到0R…

阿里云倚天服务器是什么?倚天服务器c8y、g8y和r8y详细介绍

阿里云倚天云服务器CPU采用倚天710处理器&#xff0c;租用倚天服务器c8y、g8y和r8y可以享受优惠价格&#xff0c;阿里云服务器网aliyunfuwuqi.com整理倚天云服务器详细介绍、倚天710处理器性能测评、CIPU架构优势、倚天服务器使用场景及生态支持&#xff1a; 阿里云倚天云服务…

Python中的杨辉三角

杨辉三角&#xff0c;也被称为帕斯卡三角&#xff0c;是一个非常有趣的数学结构&#xff0c;它在组合数学中扮演着重要的角色。在这篇博客中&#xff0c;我们将探讨如何在Python中生成杨辉三角&#xff0c;并讨论不同方法的优缺点。 杨辉三角简介 杨辉三角是一个由数字构成的…

OceanBase中NOT EXISTS是否需要被改写

作者简介 张瑞远&#xff0c;曾经从事银行、证券数仓设计、开发、优化类工作&#xff0c;现主要从事电信级IT系统及数据库的规划设计、架构设计、运维实施、运维服务、故障处理、性能优化等工作。 持有Orale OCM,MySQL OCP及国产代表数据库认证。 获得的专业技能与认证包括 Oce…

保障校园网络安全用堡垒机的几个原因分析

校园&#xff0c;人人都熟悉的地方&#xff0c;梦想知识开始的地方。在互联网数字化快速发展的今天&#xff0c;网络安全的学习环境是非常必要的。所以采购保障校园网络安全工具是必要的。那为什么一定要用堡垒机呢&#xff1f;这里我们一起来简单分析一下原因。 保障校园网络…

Tuxera for Mac2024软件产品密钥及下载安装教程

Tuxera for Mac在安全性和稳定性方面表现出色&#xff0c;为用户提供了可靠的数据保障和无忧的使用体验。 首先&#xff0c;从安全性角度来看&#xff0c;Tuxera for Mac采用了先进的技术来保护用户的数据。它支持快速全面的数据保护&#xff0c;通过智能缓存技术确保文件传输…

Godot 学习笔记(5):彻底的项目工程化,解决GodotProjectDir is null+工程化范例

文章目录 前言GodotProjectDir is null解决方法解决警告问题根本解决代码问题测试引用其实其它库的输出路径无所谓。 工程化范例环境命名规范Nuget项目结构架构代码ISceneModelIOC服务 测试GD_Extension 通用扩展TestUtils GD_ProgramTestServiceMainSceneModel Godot对应的脚本…

STM32存储左右互搏 SPI总线FATS文件读写SD/MicroSD/TF卡

STM32存储左右互搏 SPI总线FATS文件读写SD/MicroSD/TF卡 SD/MicroSD/TF卡是基于FLASH的一种常见非易失存储单元&#xff0c;由接口协议电路和FLASH构成。市面上由不同尺寸和不同容量的卡&#xff0c;手机领域用的TF卡实际就是MicroSD卡&#xff0c;尺寸比SD卡小&#xff0c;而…

Leo赠书活动-21期 《一篇讲明白 Hadoop 生态的三大部件》

✅作者简介&#xff1a;大家好&#xff0c;我是Leo&#xff0c;热爱Java后端开发者&#xff0c;一个想要与大家共同进步的男人&#x1f609;&#x1f609; &#x1f34e;个人主页&#xff1a;Leo的博客 &#x1f49e;当前专栏&#xff1a; 赠书活动专栏 ✨特色专栏&#xff1a;…

【算法刷题】链表笔试题解析(1)

一、链表分割 题目描述&#xff1a; 链接&#xff1a;链表分割 题目分析&#xff1a; 这题直接处理并不好做&#xff0c;我们可以构建前后两个链表&#xff0c;将小于x值的结点放在链表a内&#xff0c;将其它结点放在链表b内&#xff0c;这样将原链表遍历完后&#xff0c;原链…

Day23 代码随想录(1刷) 二叉树

669. 修剪二叉搜索树 给你二叉搜索树的根节点 root &#xff0c;同时给定最小边界low 和最大边界 high。通过修剪二叉搜索树&#xff0c;使得所有节点的值在[low, high]中。修剪树 不应该 改变保留在树中的元素的相对结构 (即&#xff0c;如果没有被移除&#xff0c;原有的父代…

PHP图床程序优化版:图片外链服务、图床API服务、图片CDN加速与破解防盗链

图片免费上传 支持本地储存、FTP储存、第三方云储存&#xff08;阿里云 OSS、腾讯云 COS、七牛云等&#xff09;。 图片外链加速 一键转换第三方网站的图片外链地址为图床可分享的图片地址&#xff08;支持CDN&#xff09;。 图片解析服务 直接将第三方外链图片地址显示为…

oracle docker安装

修改下载的Image的REPOSITORY和TAG属性 修改下载的Image的REPOSITORY和TAG属性&#xff1a;docker tag <IMAGE ID> <REPOSITORY NAME> docker tag 3fa112fd3642 aliyun/oracle_11g 参考网址 使用docker images时&#xff0c;可能会出现REPOSITORY和TAG均为none的镜…