-2
이것은 Keyshanc 암호화 알고리즘에서 가져온 것입니다. https://github.com/Networc/keyshanc문자 대체를위한 end while 루프
제 질문은 암호 배열에서 선택한 키로 여러 암호화 출력을 갖는이 주 방법을 어떻게 조작 할 수 있습니까?
끝 부분의 인코딩 루프를 벗어날 수 없습니다.
int main()
{
string password[] = {"JaneAusten", "MarkTwain", "CharlesDickens", "ArthurConanDoyle"};
for(int i=0;i<4;++i)
{
char keys[95];
keyshanc(keys, password[i]);
char inputChar, trueChar=NULL;
cout << "Enter characters to test the encoding; enter # to quit:\n";
cin>>inputChar;
for (int x=0; x < 95; ++x)
{
if (keys[x] == inputChar)
{
trueChar = char(x+32);
break;
}
}
while (inputChar != '#')
{
cout<<trueChar;
cin>>inputChar;
for (int x=0; x < 95; ++x)
{
if (keys[x] == inputChar)
{
trueChar = char(x+32);
break;
}
}
}
}
return 0;
}