Click here to Skip to main content
15,922,166 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionEncryption and decryption........... [modified] Pin
Member 387988128-Mar-07 22:24
Member 387988128-Mar-07 22:24 
AnswerRe: Encryption and decryption........... Pin
CPallini28-Mar-07 22:50
mveCPallini28-Mar-07 22:50 
AnswerRe: Encryption and decryption........... Pin
Member 387988128-Mar-07 23:35
Member 387988128-Mar-07 23:35 
GeneralRe: Encryption and decryption........... [modified] Pin
JUNEYT29-Mar-07 0:48
JUNEYT29-Mar-07 0:48 
GeneralRe: Encryption and decryption........... Pin
Member 387988129-Mar-07 1:12
Member 387988129-Mar-07 1:12 
GeneralRe: Encryption and decryption........... Pin
JUNEYT29-Mar-07 1:44
JUNEYT29-Mar-07 1:44 
GeneralRe: Encryption and decryption........... Pin
Member 387988129-Mar-07 2:00
Member 387988129-Mar-07 2:00 
GeneralRe: Encryption and decryption........... Pin
JUNEYT29-Mar-07 2:27
JUNEYT29-Mar-07 2:27 
Under the solution explorer go over the project name and then press right mouse button and select Add then Select class. A window will popup and name the class file as Encryption.vb. Copy the code and paste it inside the class file. There are two things only you have to play with it. These are:

Const ENCRYPT_KEY As String = "DRUMSSHOW"
Const ENCRYPT_VECTOR As String = "CODEPRJT"

You can encyrpt any string with your own key and vector value. You can change this. That is how any string get encrypted and decrypted with your given values as key and vetor value.



Imports System.Text
Imports System.Security.Cryptography

should be on top of the class file put these above Public Class Encryption section. Your class files becomes ready to use. Now you can encrypt and depcrypt any string as follows. This sample below is used out of class file in somewhere in your code.

Dim ShowString as String = "Put any text here"

Messagebox.Show(Encryption.toBase64(ShowString))
Messagebox.show(Encryption.toBase32(ShowString))




What a curious mind needs to discover knowledge is noting else than a pin-hole.


GeneralRe: Encryption and decryption........... Pin
Member 387988129-Mar-07 3:06
Member 387988129-Mar-07 3:06 
GeneralRe: Encryption and decryption........... Pin
JUNEYT29-Mar-07 3:31
JUNEYT29-Mar-07 3:31 
GeneralRe: Encryption and decryption........... Pin
Member 387988129-Mar-07 3:51
Member 387988129-Mar-07 3:51 
GeneralRe: Encryption and decryption........... Pin
Member 387988129-Mar-07 3:56
Member 387988129-Mar-07 3:56 
GeneralRe: Encryption and decryption........... Pin
JUNEYT29-Mar-07 4:04
JUNEYT29-Mar-07 4:04 
GeneralRe: Encryption and decryption........... Pin
Member 387988129-Mar-07 4:09
Member 387988129-Mar-07 4:09 
GeneralRe: Encryption and decryption........... Pin
JUNEYT29-Mar-07 5:51
JUNEYT29-Mar-07 5:51 
GeneralRe: Encryption and decryption........... Pin
Member 387988129-Mar-07 17:50
Member 387988129-Mar-07 17:50 
GeneralRe: Encryption and decryption........... Pin
JUNEYT29-Mar-07 21:08
JUNEYT29-Mar-07 21:08 
AnswerRe: Encryption and decryption........... Pin
Vasudevan Deepak Kumar29-Mar-07 6:16
Vasudevan Deepak Kumar29-Mar-07 6:16 
GeneralRe: Encryption and decryption........... Pin
Member 387988129-Mar-07 19:19
Member 387988129-Mar-07 19:19 
QuestionWord document Pin
scorp_scorp28-Mar-07 19:41
scorp_scorp28-Mar-07 19:41 
AnswerRe: Word document Pin
A*****28-Mar-07 19:53
A*****28-Mar-07 19:53 
GeneralRe: Word document Pin
scorp_scorp28-Mar-07 20:21
scorp_scorp28-Mar-07 20:21 
GeneralRe: Word document Pin
A*****28-Mar-07 21:11
A*****28-Mar-07 21:11 
GeneralRe: Word document Pin
scorp_scorp28-Mar-07 21:17
scorp_scorp28-Mar-07 21:17 
Questionusing DataGridViewSelectedRowCollection in VB.net Pin
Alok9128-Mar-07 19:31
Alok9128-Mar-07 19:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.