Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public async Task PerformDecodeAsync(string sourcepath, string targetPath)
- {
- using (var streamWriter = File.AppendText(targetPath))
- {
- foreach(var tempLine in File.ReadLines(sourcePath))
- {
- short decodeCounter = 0;
- StringBuilder line = new StringBuilder();
- foreach (var singleChar in tempLine)
- {
- var positionInDecodeKey = decodingKeysList[decodeCounter].IndexOf(singleChar);
- if (positionInDecodeKey > 0)
- line.Append(model.Substring(positionInDecodeKey, 1));
- else
- line.Append(singleChar);
- if (decodeCounter > 18)
- decodeCounter = 0;
- else ++decodeCounter;
- }
- await streamWriter.WriteLineAsync(line);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement