摘要: 结果: 代码: #include<stdio.h>int main(){ int a,b; int i,j,k; int extendedGCD(int a,int b,int *u,int *v); printf("请输入两个整数:"); scanf("%d,%d",&a,&b); k=exten 阅读全文
posted @ 2022-06-09 15:23 爱吃土豆的洋芋 阅读(29) 评论(0) 推荐(0) 编辑
摘要: n=2 n=1232 n=40000 代码: #include<stdio.h> #include<stdbool.h> #define max 1000 int arr[max+1]; int main() { int i,j,n; bool flag1=1; bool flag2=0; scan 阅读全文
posted @ 2022-06-09 14:38 爱吃土豆的洋芋 阅读(26) 评论(0) 推荐(0) 编辑
摘要: utils.h #ifndef UTILS_H #define UTILS_H int Hex2Char(int fromi,char *toc); int Char2Hex(char fromc,int *toi); int BitStr2ByteArr(char *bs,char *ba); i 阅读全文
posted @ 2022-06-02 15:39 爱吃土豆的洋芋 阅读(13) 评论(0) 推荐(0) 编辑
摘要: utils.h #ifndef UTILS_H #define UTILS_H int Hex2Char(int fromi,char *toc); int Char2Hex(char fromc,int *toi); int BitStr2ByteArr(char *bs,char *ba); i 阅读全文
posted @ 2022-06-02 14:52 爱吃土豆的洋芋 阅读(22) 评论(0) 推荐(0) 编辑
摘要: utils.h #ifndef UTILS_H#define UTILS_H int Hex2Char(int fromi,char *toc);//16进制数转换成16进制的字符;int Char2Hex(char fromc,int *toi);//16进制的字符转化成16进制数;int Bit 阅读全文
posted @ 2022-05-12 15:13 爱吃土豆的洋芋 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 1. 基于OpenSSL的大数库计算2的1232次方(5‘) #include <stdio.h> #include <stdlib.h> #include <string.h> #include <openssl/bn.h> int main() { BN_CTX *r; BIGNUM *a; B 阅读全文
posted @ 2022-05-12 14:16 爱吃土豆的洋芋 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 学习GMT 0018-2012密码设备应用接口规范原始文档 数据结构: 设备管理 /*功能:打开密码设备。返回设备句柄参数:phDeviceHandle[out]返回值:0 成功; 非0 失败,返回错误码*/int SDF_OpenDevice(void ** phDeviceHandle); /* 阅读全文
posted @ 2022-05-12 11:16 爱吃土豆的洋芋 阅读(87) 评论(0) 推荐(0) 编辑
摘要: 1.安装gmp 2. 基于GMP的大数库编写测试代码测试大数运算,计算2的N次方,N为你学号的后四位(5‘) #include "stdio.h" //hello world 工程默认的,如果你建立的是空工程就不需要这句 #include "gmp.h"//记得引入GMP.H的头文件 int mai 阅读全文
posted @ 2022-05-05 15:03 爱吃土豆的洋芋 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 一、微软的CryptoAPI加密技术 (一)研究学习 Windows Crypto API是Microsoft 公司提出的安全加密应用服务框架,也是PKI推荐使用的加密 API。它提供了在Win32 环境下使用认证、编码、加密和签名等安全服务时的标准加密接口,用于增强应用程序的安全性与可控性。应用开 阅读全文
posted @ 2022-04-28 12:29 爱吃土豆的洋芋 阅读(413) 评论(0) 推荐(0) 编辑
摘要: 1 编译运行附件中的代码,提交运行结果截图,并说明程序功能 程序功能:生产者消费者模型,假定有两个线程,一个消费者线程,一个生产者线程。一个模拟生产者行为,一个模拟消费者行为。两个线程同时操作一个共享资源(一般称之为汇聚),生产向其中添加产品,消费者从中消费掉产品。 2 修改代码,把同步资源个数减少 阅读全文
posted @ 2021-11-15 11:14 爱吃土豆的洋芋 阅读(26) 评论(0) 推荐(0) 编辑