Skip to content

Commit 323d2e1

Browse files
authored
rsacsp-->rsa,dsacsp-->dsa (#4469)
1 parent efdbc35 commit 323d2e1

File tree

89 files changed

+132
-134
lines changed
  • samples/snippets
    • cpp
      • VS_Snippets_CLR_System
      • VS_Snippets_CLR
        • Cryptography.XML.SignVerifyEnvelope - Specify Element/CPP
        • Cryptography.XML.Signature - Envelope/CPP
        • Cryptography.XML.XMLEncImbedKey/CPP
        • Cryptography.XML.XmlDsigExcC14NTransform/CPP
        • Cryptography.XML.XmlDsigXPathTransform/CPP
        • Cryptography.XML.XmlDsigXsltTransform/CPP
        • XMLDSIG - Signature - Detached/CPP
    • csharp
      • VS_Snippets_CLR_System
        • System.Security.Cryptography.AsymmetricKeyExchangeDeformatter/CS
        • system.Security.Cryptography.CryptoConfig/CS
        • system.Security.Cryptography.DSASignatureDeformatter/CS
        • system.Security.Cryptography.DSASignatureFormatter/CS
        • system.Security.Cryptography.XML-XMLDsigDetached/CS
        • system.Security.Cryptography.XML-XMLDsigEnvelope/CS
        • system.Security.Cryptography.XML.DSAKeyValue_Detached/CS
        • system.Security.Cryptography.XML.DSAKeyValue_Envelope/CS
        • system.Security.Cryptography.XML.KeyInfoX509Data_Detached/CS
        • system.Security.Cryptography.XML.KeyInfoX509Data_Envelope/CS
        • system.Security.Cryptography.XML.SignedXML_CheckReturnValue_Detached/CS
        • system.Security.Cryptography.XML.SignedXML_CheckReturnValue_Envelope/CS
        • system.Security.Cryptography.XML.SignedXml.ComputeSig-Check-AsymetricAlg-Detached/CS
        • system.Security.Cryptography.XML.SignedXml.ComputeSig-Check-AsymetricAlg-Envelope/CS
        • system.Security.Cryptography.XML.XmlDsigC14NWithCommentsTransform_Detached/CS
        • system.Security.Cryptography.XML.XmlDsigC14NWithCommentsTransform_Envelope/CS
        • system.Security.Cryptography.Xml.Keyreference/cs
        • system.Security.Cryptography.Xml.XmlDsigC14NTransform/CS
        • system.Security.Cryptography.Xml.XmlDsigEnvelopedSignatureTransform/CS
        • system.security.cryptography.rsapkcs1signaturedeformatterexample/cs
        • system.security.cryptography.rsapkcs1signatureformatterexample/cs
      • VS_Snippets_CLR
        • Cryptography.XML.DataReference/cs
        • Cryptography.XML.EncryptedData/cs
        • Cryptography.XML.EncryptedKey/cs
        • Cryptography.XML.EncryptionProperty/cs
        • Cryptography.XML.SignVerifyEnvelope - Specify Element/CS
        • Cryptography.XML.Signature - Envelope/CS
        • Cryptography.XML.XMLEncImbedKey/CS
        • Cryptography.XML.XmlDsigExcC14NTransform/CS
        • Cryptography.XML.XmlDsigExcC14NWithCommentsTransform/CS
        • Cryptography.XML.XmlDsigXPathTransform/CS
        • Cryptography.XML.XmlDsigXsltTransform/CS
        • XMLDSIG - Signature - Detached/CS
    • visualbasic
      • VS_Snippets_CLR_System
        • System.Security.Cryptography.AsymmetricKeyExchangeDeformatter/VB
        • system.Security.Cryptography.CryptoConfig/VB
        • system.Security.Cryptography.DSASignatureDeformatter/VB
        • system.Security.Cryptography.DSASignatureFormatter/VB
        • system.Security.Cryptography.XML-XMLDsigDetached/VB
        • system.Security.Cryptography.XML-XMLDsigEnvelope/VB
        • system.Security.Cryptography.XML.DSAKeyValue_Detached/VB
        • system.Security.Cryptography.XML.DSAKeyValue_Envelope/VB
        • system.Security.Cryptography.XML.KeyInfoX509Data_Detached/VB
        • system.Security.Cryptography.XML.KeyInfoX509Data_Envelope/VB
        • system.Security.Cryptography.XML.SignedXML_CheckReturnValue_Detached/VB
        • system.Security.Cryptography.XML.SignedXML_CheckReturnValue_Envelope/VB
        • system.Security.Cryptography.XML.SignedXml.ComputeSig-Check-AsymetricAlg-Detached/VB
        • system.Security.Cryptography.XML.SignedXml.ComputeSig-Check-AsymetricAlg-Envelope/VB
        • system.Security.Cryptography.XML.XmlDsigC14NWithCommentsTransform_Detached/VB
        • system.Security.Cryptography.XML.XmlDsigC14NWithCommentsTransform_Envelope/VB
        • system.Security.Cryptography.Xml.Keyreference/vb
        • system.Security.Cryptography.Xml.XmlDsigC14NTransform/VB
        • system.Security.Cryptography.Xml.XmlDsigEnvelopedSignatureTransform/VB
        • system.security.cryptography.rsapkcs1signaturedeformatterexample/vb
        • system.security.cryptography.rsapkcs1signatureformatterexample/vb
      • VS_Snippets_CLR
        • Cryptography.XML.DataReference/vb
        • Cryptography.XML.EncryptedData/vb
        • Cryptography.XML.EncryptedKey/vb
        • Cryptography.XML.SignVerifyEnvelope - Specify Element/VB
        • Cryptography.XML.Signature - Envelope/VB
        • Cryptography.XML.XMLEncImbedKey/VB
        • Cryptography.XML.XmlDsigExcC14NTransform/VB
        • Cryptography.XML.XmlDsigExcC14NWithCommentsTransform/VB
        • Cryptography.XML.XmlDsigXPathTransform/VB
        • Cryptography.XML.XmlDsigXsltTransform/VB
        • XMLDSIG - Signature - Detached/VB

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+132
-134
lines changed

samples/snippets/cpp/VS_Snippets_CLR/Cryptography.XML.SignVerifyEnvelope - Specify Element/CPP/sample.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ int main()
133133
{
134134

135135
// Generate a signing key.
136-
RSACryptoServiceProvider^ Key = gcnew RSACryptoServiceProvider;
136+
RSA^ Key = RSA::Create();
137137
try
138138
{
139139

@@ -168,7 +168,7 @@ int main()
168168
{
169169

170170
// Clear resources associated with the
171-
// RSACryptoServiceProvider.
171+
// RSA instance.
172172
Key->Clear();
173173
}
174174

samples/snippets/cpp/VS_Snippets_CLR/Cryptography.XML.Signature - Envelope/CPP/sample.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ int main()
127127
{
128128

129129
// Generate a signing key.
130-
RSACryptoServiceProvider^ Key = gcnew RSACryptoServiceProvider;
130+
RSA^ Key = RSA::Create();
131131
try
132132
{
133133

@@ -159,7 +159,7 @@ int main()
159159
{
160160

161161
// Clear resources associated with the
162-
// RSACryptoServiceProvider.
162+
// RSA instance.
163163
Key->Clear();
164164
}
165165

samples/snippets/cpp/VS_Snippets_CLR/Cryptography.XML.XMLEncImbedKey/CPP/sample.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ int main()
140140

141141
// Create a new RSA key. This key will encrypt a symmetric key,
142142
// which will then be imbedded in the XML document.
143-
RSA^ rsaKey = gcnew RSACryptoServiceProvider;
143+
RSA^ rsaKey = RSA::Create();
144144
try
145145
{
146146

samples/snippets/cpp/VS_Snippets_CLR/Cryptography.XML.XmlDsigExcC14NTransform/CPP/example.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ int main()
144144
{
145145

146146
// Generate a signing key.
147-
RSACryptoServiceProvider^ Key = gcnew RSACryptoServiceProvider;
147+
RSA^ Key = RSA::Create();
148148

149149
// Create an XML file to sign.
150150
CreateSomeXml( L"Example.xml" );

samples/snippets/cpp/VS_Snippets_CLR/Cryptography.XML.XmlDsigXPathTransform/CPP/sample.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ int main()
159159
{
160160

161161
// Generate a signing key.
162-
RSACryptoServiceProvider^ Key = gcnew RSACryptoServiceProvider;
162+
RSA^ Key = RSA::Create();
163163
try
164164
{
165165

samples/snippets/cpp/VS_Snippets_CLR/Cryptography.XML.XmlDsigXsltTransform/CPP/sample.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ int main()
149149
{
150150

151151
// Generate a signing key.
152-
RSACryptoServiceProvider^ Key = gcnew RSACryptoServiceProvider;
152+
RSA^ Key = RSA::Create();
153153
String^ xsl = L"\r\n <xs:transform xmlns:xs='http://www.w3.org/1999/XSL/Transform' version='1.0'>\r\n <xs:template match='/'>\r\n <xs:apply-templates/>\r\n </xs:template>\r\n <xs:template match='ElementToTransform'> \r\n <transformedElement/>\r\n </xs:template>\r\n </xs:transform>";
154154
try
155155
{

samples/snippets/cpp/VS_Snippets_CLR/XMLDSIG - Signature - Detached/CPP/sample.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ namespace Sample
2323
static void Work()
2424
{
2525
// Generate a signing key.
26-
RSACryptoServiceProvider^ key =
27-
gcnew RSACryptoServiceProvider();
26+
RSA^ key = RSA::Create();
2827

2928
try
3029
{
@@ -63,7 +62,7 @@ namespace Sample
6362
finally
6463
{
6564
// Clear resources associated with the
66-
// RSACryptoServiceProvider.
65+
// RSA instance.
6766
key->Clear();
6867
}
6968
}

samples/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.DSASignatureDeformatter/CPP/sample.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ int main()
1010
try
1111
{
1212

13-
//Create a new instance of DSACryptoServiceProvider.
14-
DSACryptoServiceProvider^ DSA = gcnew DSACryptoServiceProvider;
13+
//Create a new instance of DSA.
14+
DSA^ DSA = DSA::Create();
1515

1616
//The hash to sign.
1717
array<Byte>^Hash = {59,4,248,102,77,97,142,201,210,12,224,93,25,41,100,197,213,134,130,135};
1818

1919
//Create an DSASignatureFormatter object and pass it the
20-
//DSACryptoServiceProvider to transfer the key information.
20+
//DSA instance to transfer the key information.
2121
DSASignatureFormatter^ DSAFormatter = gcnew DSASignatureFormatter( DSA );
2222

2323
//Set the hash algorithm to SHA1.
@@ -27,7 +27,7 @@ int main()
2727
array<Byte>^SignedHash = DSAFormatter->CreateSignature( Hash );
2828

2929
//Create an DSASignatureDeformatter object and pass it the
30-
//DSACryptoServiceProvider to transfer the key information.
30+
//DSA instance to transfer the key information.
3131
DSASignatureDeformatter^ DSADeformatter = gcnew DSASignatureDeformatter( DSA );
3232

3333
//Verify the hash and display the results to the console.

samples/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.DSASignatureFormatter/CPP/sample.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ int main()
1010
try
1111
{
1212

13-
//Create a new instance of DSACryptoServiceProvider.
14-
DSACryptoServiceProvider^ DSA = gcnew DSACryptoServiceProvider;
13+
//Create a new instance of DSA.
14+
DSA^ DSA = DSA::Create();
1515

1616
//The hash to sign.
1717
array<Byte>^Hash = {59,4,248,102,77,97,142,201,210,12,224,93,25,41,100,197,213,134,130,135};
1818

1919
//Create an DSASignatureFormatter Object* and pass it the
20-
//DSACryptoServiceProvider to transfer the key information.
20+
//DSA instance to transfer the key information.
2121
DSASignatureFormatter^ DSAFormatter = gcnew DSASignatureFormatter( DSA );
2222

2323
//Set the hash algorithm to SHA1.

samples/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.XML-XMLDsigDetached/CPP/xmldsigdetach.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ int main()
9898
{
9999

100100
// Generate a signing key.
101-
RSACryptoServiceProvider^ Key = gcnew RSACryptoServiceProvider;
101+
RSA^ Key = RSA::Create();
102102
Console::WriteLine( "Signing: {0}", resourceToSign );
103103

104104
// Sign the detached resourceand save the signature in an XML file.

0 commit comments

Comments
 (0)