Skip to content

Commit 87d950f

Browse files
authored
Fix comments. (#7780)
1 parent 94c2b2f commit 87d950f

File tree

1 file changed

+7
-7
lines changed
  • snippets/csharp/System.Security.Cryptography/FromBase64Transform/Overview

1 file changed

+7
-7
lines changed

snippets/csharp/System.Security.Cryptography/FromBase64Transform/Overview/class1.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ private static void EncodeFromFile(string sourceFile, string targetFile)
5050
// Verify that multiple blocks can not be transformed.
5151
if (!base64Transform.CanTransformMultipleBlocks)
5252
{
53-
// Initializie the offset size.
53+
// Initialize the offset size.
5454
int inputOffset = 0;
5555

5656
// Iterate through inputBytes transforming by blockSize.
@@ -85,7 +85,7 @@ private static void EncodeFromFile(string sourceFile, string targetFile)
8585
// Determine if the current transform can be reused.
8686
if (!base64Transform.CanReuseTransform)
8787
{
88-
// Free up any used resources.
88+
// Free any used resources.
8989
base64Transform.Clear();
9090
}
9191
}
@@ -99,17 +99,17 @@ public static void DecodeFromFile(string inFileName, string outFileName)
9999

100100
byte[] myOutputBytes = new byte[myTransform.OutputBlockSize];
101101

102-
//Open the input and output files.
102+
// Open the input and output files.
103103
using (FileStream myInputFile = new FileStream(inFileName, FileMode.Open, FileAccess.Read))
104104
{
105105
using (FileStream myOutputFile = new FileStream(outFileName, FileMode.Create, FileAccess.Write))
106106
{
107107

108-
//Retrieve the file contents into a byte array.
108+
// Retrieve the file contents into a byte array.
109109
byte[] myInputBytes = new byte[myInputFile.Length];
110110
myInputFile.Read(myInputBytes, 0, myInputBytes.Length);
111111

112-
//Transform the data in chunks the size of InputBlockSize.
112+
// Transform the data in chunks the size of InputBlockSize.
113113
int i = 0;
114114
while (myInputBytes.Length - i > 4/*myTransform.InputBlockSize*/)
115115
{
@@ -118,11 +118,11 @@ public static void DecodeFromFile(string inFileName, string outFileName)
118118
myOutputFile.Write(myOutputBytes, 0, bytesWritten);
119119
}
120120

121-
//Transform the final block of data.
121+
// Transform the final block of data.
122122
myOutputBytes = myTransform.TransformFinalBlock(myInputBytes, i, myInputBytes.Length - i);
123123
myOutputFile.Write(myOutputBytes, 0, myOutputBytes.Length);
124124

125-
//Free up any used resources.
125+
// Free up any used resources.
126126
myTransform.Clear();
127127
}
128128
}

0 commit comments

Comments
 (0)