CodeForge.comFree Open Source Codes Forge and Sharing |
// This is a slow but easy RSA encryption class
// By sanicle,2005.12
// 3mn@3mn.net
#include "vlong.h"
#define PRIME_COUNT 1000000
class RSA_san
{
public:
char r1[70];
char r2[70];
vlong n,e,d,p,q;
vlong result;
vlong prime_table[PRIME_COUNT];
int prime_table_use;
int prime_p_index;
int prime_q_index;
RSA_san();
~RSA_san();
vlong encrypt( const vlong& x );
vlong decrypt( const vlong& y );
int RSA_san_en(char * s,unsigned n);
int RSA_san_en_byte(char b);
int RSA_san_dn(char * s,unsigned n);
int RSA_san_dn_hexstring(
...
...
... to be continued.
This is a preview. To get the complete source file,
please click here to download the whole source code package.
| Name | Size | Date |
| 1,003.00 B | 18-01-06 12:31 | |
| 3.30 kB | 18-01-06 23:20 | |
| 522.00 B | 18-01-06 23:21 | |
| 9.02 kB | 21-01-06 15:30 | |
| 1.11 kB | 21-01-06 15:30 | |
| 2.92 kB | 23-01-06 11:43 | |
| 1.56 kB | 23-01-06 11:48 | |
| 215.00 B | 18-01-06 12:31 | |
| 263.00 B | 18-01-06 12:31 | |
| 10.56 kB | 19-01-06 13:38 | |
| 1.74 kB | 19-01-06 13:37 | |
| 1.04 kB | 19-01-06 15:14 | |
| 3.30 kB | 18-01-06 23:20 | |
| 522.00 B | 18-01-06 23:21 | |
| 9.02 kB | 21-01-06 15:30 | |
| 1.11 kB | 21-01-06 15:30 | |
| 2.92 kB | 23-01-06 11:43 | |
| 1.56 kB | 23-01-06 11:48 | |
| 90.00 B | 19-01-06 15:20 | |
| 223.00 B | 19-01-06 15:14 | |
| 195.00 B | 19-01-06 15:14 | |
| 10.56 kB | 19-01-06 13:38 | |
| 1.74 kB | 19-01-06 13:37 | |
| 0.00 B | 24-04-08 09:20 | |
| 0.00 B | 24-04-08 09:21 | |
| 0.00 B | 22-04-09 08:21 |