12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
ADADADADAD
网络知识 时间:2024-12-03 10:19:50
作者:文/会员上传
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
使用RSA算法对数据进行加密的方法具体方法如下:#ifndef ENCRYPT_H#define ENCRYPT_H/*在一个安全实现中,Huge 最少要400位10进制数字*/typedef unsigned long Huge; /*为RSA公
以下为本文的正文内容,内容仅供参考!本站为公益性网站,复制本文以及下载DOC文档全部免费。
使用RSA算法对数据进行加密的方法
具体方法如下:
#ifndef ENCRYPT_H
#define ENCRYPT_H
/*在一个安全实现中,Huge 最少要400位10进制数字*/
typedef unsigned long Huge;
/*为RSA公钥定义一个数据结构*/
typedef struct RsaPubKey_
{
Huge e;
Huge n;
}RsaPubkey;
/*为RSA私钥定义一个数据结构*/
typedef struct RsaPriKey_
{
Huge d;
Huge n;
}RsaPriKey;
/*函数声明*/
void des_encipher(const unsigned char *plaintext, unsigned char *ciphertext, const unsigned char *key);
void des_decipher(const unsigned char *ciphertext, unsigned char *plaintext, const unsigned char *key);
void rsa_encipher(Huge plaintext, Huge *ciphertext, RsaPubKey pubkey);
void rsa_decipher(Huge ciphertext,Huge *plaintext, RsaPriKey prikey);
#endif
11-20
11-19
11-20
11-20
11-20
11-19
11-20
11-20
11-19
11-20
11-19
11-19
11-19
11-19
11-19
11-19