本文整理匯總了VB.NET中System.Security.Cryptography.RSACryptoServiceProvider.ImportParameters方法的典型用法代碼示例。如果您正苦於以下問題:VB.NET RSACryptoServiceProvider.ImportParameters方法的具體用法?VB.NET RSACryptoServiceProvider.ImportParameters怎麽用?VB.NET RSACryptoServiceProvider.ImportParameters使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Security.Cryptography.RSACryptoServiceProvider
的用法示例。
在下文中一共展示了RSACryptoServiceProvider.ImportParameters方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: RSACryptoServiceProvider
Try
'Create a new RSACryptoServiceProvider object.
Using RSA As New RSACryptoServiceProvider()
'Export the key information to an RSAParameters object.
'Pass false to export the public key information or pass
'true to export public and private key information.
Dim RSAParams As RSAParameters = RSA.ExportParameters(False)
'Create another RSACryptoServiceProvider object.
Using RSA2 As New RSACryptoServiceProvider()
'Import the key information from the other
'RSACryptoServiceProvider object.
RSA2.ImportParameters(RSAParams)
End Using
End Using
Catch e As CryptographicException
'Catch this exception in case the encryption did
'not succeed.
Console.WriteLine(e.Message)
End Try
開發者ID:VB.NET開發者,項目名稱:System.Security.Cryptography,代碼行數:23,代碼來源:RSACryptoServiceProvider.ImportParameters