Diogenes #3

Merged
rjindael merged 3 commits from master into master 2020-05-05 18:06:56 -05:00
1 changed files with 3 additions and 3 deletions
Showing only changes of commit 8ce63bb949 - Show all commits

View File

@ -22,15 +22,15 @@ public class CryptoRandom : RandomNumberGenerator
public static string DiogenesCrypt(string word) public static string DiogenesCrypt(string word)
{ {
string result = ""; StringBuilder result = new StringBuilder("");
byte[] bytes = Encoding.ASCII.GetBytes(word); byte[] bytes = Encoding.ASCII.GetBytes(word);
foreach (byte singular in bytes) foreach (byte singular in bytes)
{ {
result += Convert.ToChar(0x55 ^ singular); result.Append(Convert.ToChar(0x55 ^ singular));
} }
return result; return result.ToString();
} }
///<param name=”buffer”>An array of bytes to contain random numbers.</param> ///<param name=”buffer”>An array of bytes to contain random numbers.</param>