Kaut ko apmēram šādu:
...if (XYZCube >= 8 && XYZCube < 9)
XYZCube = 8;
if (XYZCube >= 9)
XYZCube = 9;
BKOZ = BKOZ - XYZCube;
varnum = XYZCube;
VarSimbols(varnum, BKO, CryptoRandom, x, Write, Name012, ex2);
ex2++;
M--;
}
}
private static void Funkcija(int x, string UncryptedText, int i, int[] BKO, Random CryptoRandom)
{
// Izdaram ta,lai vinjsh neparbauditu pedejo burtu
if (x == UncryptedText.Length)
x = UncryptedText.Length - 1;
// Iedodam y vertibai 0 ,lai neparbauditu sakuma burtu ,
// jo savadaak default vajadzetu -1
int y = 0;
do
{
// Ja teksta ir tikai viens burts tad y=0,
// savaadaak y++;
if (UncryptedText.Length == 1)
y = 0;
else
y++;
//Taisam reset integeram xy
int xy;
// Ja teksta ir tikai viens burts tad xy=0,
// savaadaak xy=1;
if (UncryptedText.Length == 1)
xy = 0;
else
xy = 1;
do
{
//Atrodam teksta lidzigos burtus un vinjiem visiem pieshkjiram vienadus BKO
if (UncryptedText[y] == UncryptedText[xy])
{
BKO[xy] = BKO[y];
BKO[y] = BKO[xy];
}
xy++;
} while (xy < i - 1);
} while (y < x);
}
private long Randomize()
{
byte[] buffer = Guid.NewGuid().ToByteArray();
return BitConverter.ToInt64(buffer, 0);
}
private static void FunkcijaBKO(int[] BKOie1, int[] BKOie2, string BKOO, string UncryptedText, int x, int[] BKO, Random CryptoRandom, int[] parBKO, int x2)
{
int y;
// Reset taisam y vertibai
// Ja tekstaa ir tikai 1 burts,
// tad y = 0 savaadaak,
// y = 1;
if (UncryptedText.Length == 1)
{
y = 0;
}
else
y = 1;
//Stringam BKOO2 pieshkjiram jauno BKO vertibu
string BKOO2 = "" + BKO[x];
// Izdaram atkal taa, lai pedejo burtu nepaarbaudiitu!
if (x == UncryptedText.Length)
x = UncryptedText.Length - 1;
do
{
//Parbaudam vai pirms tam nav bijis kads lidzigs simbols, ja ir tad iedodam BKO[x] tadu pashu vertibu
if (UncryptedText[x] == UncryptedText[y])
{
BKO[x] = BKO[y];
//Iedodam atkal jauno vertibu stringam BKOO2
BKOO2 = "" + BKO[x];
//Liksim izbeigt loopu uzreiz iedodot y vertibai x vertibu
y = x;
//Atnjemam vienu ,jo man taa patiik =D
y--;
}
y++;
}
while (y < x);
//Parbaudam vai iepriekshejais strings BKOO nav liidzigs BKOO2 ,ja ir tad turpinam neko nedarot sheit,
// ja nav tad BKO[x] pieshkjiram jaunu veribu!
if (BKOO != BKOO2)
{
if (UncryptedText.Length == 1)
{
BKO[x] = CryptoRandom.Next(0, 5);
}
else if (UncryptedText.Length > 1)
{
BKO:
BKO[x] = CryptoRandom.Next(BKOie2[0], BKOie2[42]);
if (x == 1)
{
parBKO[x2] = BKO[x];
goto BKOend;
}
int xyparbaude = 0;
do...
Ja ir vēlme, vari palīdzēt...