-
Notifications
You must be signed in to change notification settings - Fork 2
Encryption
Greg Finzer edited this page Sep 26, 2018
·
3 revisions
Encryption encryption = new Encryption();
string creditCardNumber = "4444333322221111";
byte[] inputBytes = Encoding.UTF8.GetBytes(creditCardNumber);
string password = "&%)(&JUI";
byte[] encrypted = encryption.EncryptBytes(inputBytes, password);
byte[] decrypted = encryption.DecryptBytes(encrypted, password);
string decryptedCreditCardNumber = System.Text.Encoding.UTF8.GetString(decrypted);Dim encryption As New Encryption()
Dim creditCardNumber As String = "4444333322221111"
Dim inputBytes() As Byte = Encoding.UTF8.GetBytes(creditCardNumber)
Dim password As String = "&%)(&JUI"
Dim encrypted() As Byte = encryption.EncryptBytes(inputBytes, password)
Dim decrypted() As Byte = encryption.DecryptBytes(encrypted, password)
Dim outputString As String = System.Text.Encoding.UTF8.GetString(decrypted)