#include<stdio.h>
#include<string.h>
#define SIZE 100
char keyA[SIZE],keyB[SIZE],key[SIZE],cKey[SIZE];
char plaintext1A[SIZE]={0},plaintext1[SIZE]={0};
char ciphertext1[SIZE]={0};
char plaintext2[SIZE]={0};
char ciphertext2[SIZE]={0};
char ciphertext2A[SIZE]={0};
void GetKey() {
printf("请输入密钥");
scanf("%s",keyA);
int i,j;
for (i=0,j=0;keyA[i]!='\0';i++,j++)
{
keyB[j]=keyA[i];
if (keyB[j]>='A' && keyB[j]<='Z')
keyB[j]=keyA[j]+32;
key[j]=keyB[j];
}
}
void CiKeyToCKey() {
int i;
int j=0;
for(i=0; i<strlen(plaintext1); i++) {
if(key[j]=='\0') {
j=0;
}
cKey[i] = key[j];
j++;
}
}
void PKeyToCKey() {
int i;
int j=0;
for(i=0; i<strlen(ciphertext2); i++) {
if(key[j]=='\0') {
j=0;
}
cKey[i] = key[j];
j++;
}
}
void GetPlainText(){
printf("请输入明文");
getchar();
gets(plaintext1A);
int i;
for(i=0;i<SIZE;i++)
{
if (plaintext1A[i]>='A'&& plaintext1A[i]<='Z')
plaintext1[i]=plaintext1A[i]+32;
else