使用密码加密
/* 功能:使用密码加密 日期:2013-05-29 */ #include <stdio.h> #include <stdlib.h> #include <string.h> #define LEN 1000 int main(void) { char ming[]=“abcdefghijklmnopqrstuvwxyz1234567890”; char mi[]=“67adrb5jq0sxe8fo1z3ymnl2ivu4gctw9kph”; char tmpMing[LEN]={0}; int i,j; printf(“密码表的内容为:”); printf(“明文表:%sn”,ming); printf(“密文表:%sn”,mi); printf(“请输入明文:”); gets(tmpMing); printf(“加密后的密文:”); for (i=0;i<strlen(tmpMing);i++) { for (j=0;j<37;j++) { if (tmpMing[i]==ming[j]) { printf(“%c”,mi[j]); } } } printf(“n”); system(“pause”); return 0; }
Preview
除特别注明外,本站所有文章均为 Windcoder网 原创,转载请注明出处来自: use-password-encryption
Loading comments...

Preview
No Data