OC-NightHawk
Member
- Joined
- Jul 24, 2004
- Messages
- 13
the encryption and decryption are wrapped by these two functions that return stings.
however
generates the following error attached a png.
Code:
Public Shared Function DecryptRSA(ByVal EncryptedText As String, ByVal iKey As String) As String
Dim EncryptedDataBytes() As Byte
Dim DecryptedText As String
enter the full fledged private key to unlock decryption
RSAKey.FromXmlString(iKey)
If EncryptedText <> "" Then
EncryptedDataBytes = RSAKey.Decrypt(Encoding.Unicode.GetBytes(EncryptedText), False)
DecryptedText = Encoding.Unicode.GetString(EncryptedDataBytes)
End If
Return (DecryptedText)
End Function
Public Shared Function EncryptRSA(ByVal TextToEncrypt As String, ByVal iKey As String) As String
Dim EncryptedDataBytes() As Byte
Dim EncryptedData As String
enter the public key it recieved when trading to unlock encryption
RSAKey.FromXmlString(iKey)
EncryptedDataBytes = RSAKey.Encrypt(Encoding.Unicode.GetBytes(TextToEncrypt), False)
EncryptedData = Encoding.Unicode.GetString(EncryptedDataBytes)
Return (EncryptedData)
End Function
however
Code:
BW.Write(Encryption.EncryptRSA(Str(.LicenseType) & "," & _
Str(.DaysRemaining) & "," & .SerialNumber & "," & _
.LicenseID, Encryption.SharedClientPublicKey))
generates the following error attached a png.