8000 Correct spelling of s_aditionalEntropy to s_additionalEntropy in data… · CAndRyan/dotnet-api-docs@504ccd3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 504ccd3

Browse files
authored
Correct spelling of s_aditionalEntropy to s_additionalEntropy in data protection API samples (dotnet#4209)
1 parent 279504f commit 504ccd3

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

samples/snippets/cpp/VS_Snippets_CLR/Cryptography.DataProtectionSample/CPP/dataprotectionsample.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public ref class DataProtectionSample
99
private:
1010

1111
// Create byte array for additional entropy when using Protect method.
12-
static array<Byte>^s_aditionalEntropy = {9,8,7,6,5};
12+
static array<Byte>^s_additionalEntropy = {9,8,7,6,5};
1313

1414
public:
1515
static void Main()
@@ -36,7 +36,7 @@ public ref class DataProtectionSample
3636

3737
// Encrypt the data using DataProtectionScope.CurrentUser. The result can be decrypted
3838
// only by the same current user.
39-
return ProtectedData::Protect( data, s_aditionalEntropy, DataProtectionScope::CurrentUser );
39+
return ProtectedData::Protect( data, s_additionalEntropy, DataProtectionScope::CurrentUser );
4040
}
4141
catch ( CryptographicException^ e )
4242
{
@@ -52,7 +52,7 @@ public ref class DataProtectionSample
5252
{
5353

5454
//Decrypt the data using DataProtectionScope.CurrentUser.
55-
return ProtectedData::Unprotect( data, s_aditionalEntropy, DataProtectionScope::CurrentUser );
55+
return ProtectedData::Unprotect( data, s_additionalEntropy, DataProtectionScope::CurrentUser );
5656
}
5757
catch ( CryptographicException^ e )
5858
{

samples/snippets/cpp/VS_Snippets_CLR_System/system.Security.Permissions.DataProtectionPermission2/CPP/dataprotect.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public ref class DataProtect
1717

1818
// Create a byte array for additional entropy when using the
1919
// Protect and Unprotect methods.
20-
static array<Byte>^ s_aditionalEntropy = {9,8,7,6,5};
20+
static array<Byte>^ s_additionalEntropy = {9,8,7,6,5};
2121
static array<Byte>^ encryptedSecret;
2222
static array<Byte>^ originalData;
2323

@@ -166,7 +166,7 @@ public ref class DataProtect
166166
// Encrypt the data using DataProtectionScope.CurrentUser.
167167
// The result can be decrypted only by the user who encrypted
168168
// the data.
169-
return ProtectedData::Protect( data, s_aditionalEntropy, DataProtectionScope::CurrentUser );
169+
return ProtectedData::Protect( data, s_additionalEntropy, DataProtectionScope::CurrentUser );
170170
}
171171
catch ( CryptographicException^ e )
172172
{
@@ -193,7 +193,7 @@ public ref class DataProtect
193193
{
194194

195195
//Decrypt the data using DataProtectionScope.CurrentUser.
196-
return ProtectedData::Unprotect( data, s_aditionalEntropy, DataProtectionScope::CurrentUser );
196+
return ProtectedData::Unprotect( data, s_additionalEntropy, DataProtectionScope::CurrentUser );
197197
}
198198
catch ( CryptographicException^ e )
199199
{

samples/snippets/csharp/VS_Snippets_CLR/Cryptography.DataProtectionSample/CS/dataprotectionsample.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
public class DataProtectionSample
66
{
77
// Create byte array for additional entropy when using Protect method.
8-
static byte [] s_aditionalEntropy = { 9, 8, 7, 6, 5 };
8+
static byte [] s_additionalEntropy = { 9, 8, 7, 6, 5 };
99

1010
public static void Main()
1111
{
@@ -29,7 +29,7 @@ public static byte [] Protect( byte [] data )
2929
{
3030
// Encrypt the data using DataProtectionScope.CurrentUser. The result can be decrypted
3131
// only by the same current user.
32-
return ProtectedData.Protect( data, s_aditionalEntropy, DataProtectionScope.CurrentUser );
32+
return ProtectedData.Protect( data, s_additionalEntropy, DataProtectionScope.CurrentUser );
3333
}
3434
catch (CryptographicException e)
3535
{
@@ -44,7 +44,7 @@ public static byte [] Unprotect( byte [] data )
4444
try
4545
{
4646
//Decrypt the data using DataProtectionScope.CurrentUser.
47-
return ProtectedData.Unprotect( data, s_aditionalEntropy, DataProtectionScope.CurrentUser );
47+
return ProtectedData.Unprotect( data, s_additionalEntropy, DataProtectionScope.CurrentUser );
4848
}
4949
catch (CryptographicException e)
5050
{

samples/snippets/csharp/VS_Snippets_CLR_System/system.Security.Permissions.DataProtectionPermission2/CS/dataprotect.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public class DataProtect
99
{
1010
// Create a byte array for additional entropy when using the
1111
// Protect and Unprotect methods.
12-
static byte[] s_aditionalEntropy = { 9, 8, 7, 6, 5 };
12+
static byte[] s_additionalEntropy = { 9, 8, 7, 6, 5 };
1313

1414
private static byte[] encryptedSecret;
1515
private static byte[] originalData;
@@ -149,7 +149,7 @@ public static byte[] Protect(byte[] data)
149149
// the data.
150150
return ProtectedData.Protect(
151151
data,
152-
s_aditionalEntropy,
152+
s_additionalEntropy,
153153
DataProtectionScope.CurrentUser);
154154
}
155155
catch (CryptographicException e)
@@ -176,7 +176,7 @@ public static byte[] Unprotect(byte[] data)
176176
//Decrypt the data using DataProtectionScope.CurrentUser.
177177
return ProtectedData.Unprotect(
178178
data,
179-
s_aditionalEntropy,
179+
s_additionalEntropy,
180180
DataProtectionScope.CurrentUser);
181181
}
182182
catch (CryptographicException e)

samples/snippets/visualbasic/VS_Snippets_CLR/Cryptography.DataProtectionSample/vb/dataprotectionsample.vb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Imports System.Security.Cryptography
55

66
Public Class DataProtectionSample
77
' Create byte array for additional entropy when using Protect method.
8-
Private Shared s_aditionalEntropy As Byte() = {9, 8, 7, 6, 5}
8+
Private Shared s_additionalEntropy As Byte() = {9, 8, 7, 6, 5}
99

1010

1111
Public Shared Sub Main()
@@ -29,7 +29,7 @@ Public Class DataProtectionSample
2929
Try
3030
' Encrypt the data using DataProtectionScope.CurrentUser. The result can be decrypted
3131
' only by the same current user.
32-
Return ProtectedData.Protect(data, s_aditionalEntropy, DataProtectionScope.CurrentUser)
32+
Return ProtectedData.Protect(data, s_additionalEntropy, DataProtectionScope.CurrentUser)
3333
Catch e As CryptographicException
3434
Console.WriteLine("Data was not encrypted. An error occurred.")
3535
Console.WriteLine(e.ToString())
@@ -42,7 +42,7 @@ Public Class DataProtectionSample
4242
Public Shared Function Unprotect(ByVal data() As Byte) As Byte()
4343
Try
4444
'Decrypt the data using DataProtectionScope.CurrentUser.
45-
Return ProtectedData.Unprotect(data, s_aditionalEntropy, DataProtectionScope.CurrentUser)
45+
Return ProtectedData.Unprotect(data, s_additionalEntropy, DataProtectionScope.CurrentUser)
4646
Catch e As CryptographicException
4747
Console.WriteLine("Data was not decrypted. An error occurred.")
4848
Console.WriteLine(e.ToString())

samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Permissions.DataProtectionPermission2/VB/dataprotect.vb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Imports System.IO
99
Public Class DataProtect
1010
' Create a byte array for additional entropy when using the
1111
' Protect and Unprotect methods.
12-
Private Shared s_aditionalEntropy As Byte() = {9, 8, 7, 6, 5}
12+
Private Shared s_additionalEntropy As Byte() = {9, 8, 7, 6, 5}
1313

1414
Private Shared encryptedSecret() As Byte
1515
Private Shared originalData() As Byte
@@ -126,7 +126,7 @@ Public Class DataProtect
126126
' Encrypt the data using DataProtectionScope.CurrentUser.
127127
' The result can be decrypted only by the user who encrypted
128128
' the data.
129-
Return ProtectedData.Protect(data, s_aditionalEntropy, DataProtectionScope.CurrentUser)
129+
Return ProtectedData.Protect(data, s_additionalEntropy, DataProtectionScope.CurrentUser)
130130
Catch e As CryptographicException
131131
Console.WriteLine("Data was not encrypted. " + "An error has occurred.")
132132
Console.WriteLine(e.ToString())
@@ -144,7 +144,7 @@ Public Class DataProtect
144144
Public Shared Function Unprotect(ByVal data() As Byte) As Byte()
145145
Try
146146
'Decrypt the data using DataProtectionScope.CurrentUser.
147-
Return ProtectedData.Unprotect(data, s_aditionalEntropy, DataProtectionScope.CurrentUser)
147+
Return ProtectedData.Unprotect(data, s_additionalEntropy, DataProtectionScope.CurrentUser)
148148
Catch e As CryptographicException
149149
Console.WriteLine("Data was not decrypted. " + "An error has occurred.")
150150
Console.WriteLine(e.ToString())

0 commit comments

Comments
 (0)
0