|
security
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Asymetric Key PairsI've seen some code which makes perfect sense, but what namespace is the
encryption class. Furthermore, when I create my key pair how the distribute the public key. Dim asym As New Encryption.Asymmetric() Dim pubkey As New Encryption.Asymmetric.PublicKey() Dim privkey As New Encryption.Asymmetric.PrivateKey() asym.GenerateNewKeyset(pubkey, privkey) Dim secret As String = "ancient chinese" Dim encryptedData As Encryption.Data encryptedData = asym.Encrypt(New Encryption.Data(secret), pubkey) Dim decryptedData As Encryption.Data Dim asym2 As New Encryption.Asymmetric() decryptedData = asym2.Decrypt(encryptedData, privkey) You can extract the public key from the keypair with sn.exe
namespace: System.Security.Cryptography Show quoteHide quote "Chris Kennedy" wrote: > I've seen some code which makes perfect sense, but what namespace is the > encryption class. Furthermore, when I create my key pair how the distribute > the public key. > > Dim asym As New Encryption.Asymmetric() > Dim pubkey As New Encryption.Asymmetric.PublicKey() > Dim privkey As New Encryption.Asymmetric.PrivateKey() > asym.GenerateNewKeyset(pubkey, privkey) > Dim secret As String = "ancient chinese" > Dim encryptedData As Encryption.Data > encryptedData = asym.Encrypt(New Encryption.Data(secret), pubkey) > Dim decryptedData As Encryption.Data > Dim asym2 As New Encryption.Asymmetric() > decryptedData = asym2.Decrypt(encryptedData, privkey) > > >
Import RSA parameters from .PEM format
Getting User Information from a SID LogonUser Succeeds - but fails later Authenticate User in Windows 2000 machine .NET 2.0 Membership "role context" Weird registry behavior when writing to custom event log IsInRole & SID/Token Caching in .NET v1.1 Forms Authentication Not Redirecting To Login Page Export and Import RSA Key Container Get an unauthenticated windowsIdentity? |
|||||||||||||||||||||||