www.pudn.com > CipherSystem.rar > LFSRCipherSystem.cpp
#include "stdafx.h"
#include "LFSRCipherSystem.h"
//////////////////////////////////////////////////////////////////////////////////////
//////////////// Implement class of LFSRCipherSystem ////////////////////////
//////////////////////////////////////////////////////////////////////////////////////
void LFSRCipherSystem::GetData(const string& input)
{
text = input;
}
void LFSRCipherSystem::GetKey(const string& key, int feedback[], int feedbackLen)
{
keyStream.erase();
CharToBinary(key, shiftRegister);
int len = (int)text.length() * 8;
int i;
for (i=0; i