3个回答

sinat_31173723 文本
4 年多之前 回复

C语言文件简单加密与解密

C语言关于加密解密过程？

C语言实现RSA解密时的一个问题

Problem Description The Sarcophagus itself is locked by a secret numerical code. When somebody wants to open it, he must know the code and set it exactly on the top of the Sarcophagus. A very intricate mechanism then opens the cover. If an incorrect code is entered, the tickets inside would catch fire immediately and they would have been lost forever. The code (consisting of up to 100 integers) was hidden in the Alexandrian Library but unfortunately, as you probably know, the library burned down completely. But an almost unknown archaeologist has obtained a copy of the code something during the 18th century. He was afraid that the code could get to the ``wrong people'' so he has encoded the numbers in a very special way. He took a random complex number B that was greater (in absolute value) than any of the encoded numbers. Then he counted the numbers as the digits of the system with basis B. That means the sequence of numbers an, an-1, ..., a1, a0 was encoded as the number X = a0 + a1B + a2B2 + ...+ anBn. Your goal is to decrypt the secret code, i.e. to express a given number X in the number system to the base B. In other words, given the numbers X and Byou are to determine the ``digit'' a0 through an. Input The input consists of T test cases. The number of them (T) is given on the first line of the input file. Each test case consists of one single line containing four integer numbers Xr, Xi, Br, Bi (|Xr|,|Xi| <= 1000000, |Br|,|Bi| <= 16). These numbers indicate the real and complex components of numbers X and B, i.e. X = Xr + i.Xi, B = Br + i.Bi. B is the basis of the system (|B| > 1), X is the number you have to express. Output Your program must output a single line for each test case. The line should contain the ``digits'' an, an-1, ..., a1, a0, separated by commas. The following conditions must be satisfied: for all i in {0, 1, 2, ...n}: 0 <= ai < |B| X = a0 + a1B + a2B2 + ...+ anBn if n > 0 then an <> 0 n <= 100 If there are no numbers meeting these criteria, output the sentence "The code cannot be decrypted.". If there are more possibilities, print any of them. Sample Input 4 -935 2475 -11 -15 1 0 -3 -2 93 16 3 2 191 -192 11 -12 Sample Output 8,11,18 1 The code cannot be decrypted. 16,15

c语言文件加密，加密出现问题，解密不了

c语言 文件加密问题

C使用openssl RSA base64对数据进行加密解密出错

Michael密码加密字符串的问题，采用C语言如何实现，具体的算法

Problem Description I believe many people are the fans of prison break. How clever Michael is!! In order that the message won't be found by FBI easily, he usually send code letters to Sara by a paper crane. Hence, the paper crane is Michael in the heart of Sara. Now can you write a program to help Sara encode the letter from Michael easily? The letter from Michael every time is a string of lowercase letters. You should encode letters as the rules below: b is ' ', q is ',', t is '!', m is l, i is e, c is a, a is c, e is i, l is m. It is interesting. Are you found that it is just change michael to leahcim? Input The input will consist of several cases, one per line. Each case is a letter from Michael, the letteres won't exceed 10000. Output For each case, output the encode letter one line. Sample Input pmicsibforgevibliqbscrct ebmovibyout Sample Output please forgive me, sara! i love you!

C语言系统登录中，密码加密函数中调用其他函数

Problem Description Xiaoming has just come up with a new way for encryption, by calculating the key from a publicly viewable number in the following way: Let the public key N = AB, where 1 <= A, B <= 1000000, and a0, a1, a2, …, ak-1 be the factors of N, then the private key M is calculated by summing the cube of number of factors of all ais. For example, if A is 2 and B is 3, then N = AB = 8, a0 = 1, a1 = 2, a2 = 4, a3 = 8, so the value of M is 1 + 8 + 27 + 64 = 100. However, contrary to what Xiaoming believes, this encryption scheme is extremely vulnerable. Can you write a program to prove it? Input There are multiple test cases in the input file. Each test case starts with two integers A, and B. (1 <= A, B <= 1000000). Input ends with End-of-File. Note: There are about 50000 test cases in the input file. Please optimize your algorithm to ensure that it can finish within the given time limit. Output For each test case, output the value of M (mod 10007) in the format as indicated in the sample output. Sample Input 2 2 1 1 4 7 Sample Output Case 1: 36 Case 2: 1 Case 3: 4393

PTA的数字加密题？求大佬教

#include<stdio.h> int main() { int a[10],temp[10],Sum,c,d,V; int n=1; int i = 1000; scanf("%d",&Sum); while(Sum>0) { a[n]=Sum/i; //这里是用于转换位数的 i/10; Sum =Sum%i; a[n]=(a[n]+9)%10; n++; temp[n]=a[n-1]*10+a[n]; } c=temp[1]; //位数顺序变换 temp[1]=temp[3]; temp[3]=c; d=temp[2]; temp[2]=temp[4]; temp[4]=d; printf("The encrypted number is %d%d%d%d",temp[1],temp[2],temp[3],temp[4]); return 0; } ``` 我的程序运行不了呀 ```

struct slink *jiami(int e[MAX],int n[MAX],struct slink *head) ////数据加密 { struct slink *p; struct slink *h; struct slink *p1,*p2; int m=0,i; printf("\n"); printf("加密后形成的密文内容：\n"); p1=p2=(struct slink* )malloc(LEN); h=NULL; p=head; if(head!=NULL) do { expmod( p->bignum , e ,n ,p1->bignum); for(i=0;i<p1->bignum[MAX-1];i++) { printf("%d",p1->bignum[p1->bignum[MAX-1]-1-i]); } m=m+1; if(m==1) h=p1; else p2->next=p1; p2=p1; p1=(struct slink * )malloc(LEN); p=p->next; } while(p!=NULL); p2->next=NULL; p=h; printf("\n"); return(h); }

java 解密 c语言的密文

2020阿里全球数学大赛：3万名高手、4道题、2天2夜未交卷

HashMap底层实现原理，红黑树，B+树，B树的结构原理 Spring的AOP和IOC是什么？它们常见的使用场景有哪些？Spring事务，事务的属性，传播行为，数据库隔离级别 Spring和SpringMVC，MyBatis以及SpringBoot的注解分别有哪些？SpringMVC的工作原理，SpringBoot框架的优点，MyBatis框架的优点 SpringCould组件有哪些，他们...

《Oracle Java SE编程自学与面试指南》最佳学习路线图2020年最新版（进大厂必备）

《Oracle Java SE编程自学与面试指南》最佳学习路线图（2020最新版）