Hack Forums
[.NET] [Visual Basic Tutorial][IMAGES]Basic String Encryption[IMAGES][Visual Basic Tutorial] - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] [Visual Basic Tutorial][IMAGES]Basic String Encryption[IMAGES][Visual Basic Tutorial] (/showthread.php?tid=2171786)



[Visual Basic Tutorial][IMAGES]Basic String Encryption[IMAGES][Visual Basic Tutorial] - Kenny252 - Feb 2, 2012

Goal: Encrypt and Decrypt strings

To start create a new Console project:
Spoiler (Click to View)

Next, right click on your projects folder in the solution explorer and hit add new item:
Spoiler (Click to View)

Then, select class from the list and call it whatever you want:
Spoiler (Click to View)

After that, start off by writing the functions:
Spoiler (Click to View)

Then declare the variables we will be using:
Spoiler (Click to View)

Now comes the part for encrypting the string using the password:
Spoiler (Click to View)

Now to code the inverse of the encrypt so we are able to decrypt:
Spoiler (Click to View)

Now to keep exceptions out add try statements to the encrypt and decrypt functions:
Spoiler (Click to View)

Now implement it into the main module:
Spoiler (Click to View)

Success:
Spoiler (Click to View)

Explanation:
Spoiler (Click to View)

Download my own more neat string encryption and decryption program

Virus Scan for those of you who want one:

Spoiler (Click to View)

-Kenny252


* - marvinn - Feb 2, 2012

Why using a seperate class? Btw, if you do. Why don't you use Shared Subs..?


* - Kenny252 - Feb 2, 2012

(Feb 2, 2012 05:13 AM)marvinn Wrote:  Why using a seperate class? Btw, if you do. Why don't you use Shared Subs..?

About the class, you can just include it in other projects if you want to use it in others and for shared subs well this is just how I made the tutorial.


* - marvinn - Feb 2, 2012

u mad bro? It would be easyer to do it like Class.Encrypt() then New class().Encrypt().. Just sayin don't be mad ;o


* - xDISFIGURE - Feb 2, 2012

Nice share thanks ;) ! really basic but very good !


* - ProjectZerg - Feb 2, 2012

Thanks, this guide was really informative. This method isn't that good though because your password is limited. It has to be a number and if your password exceeds a certain amount your algorithm can not convert it to a character.

Thanks for sharing!

(Feb 2, 2012 06:52 AM)marvinn Wrote:  u mad bro? It would be easyer to do it like Class.Encrypt() then New class().Encrypt().. Just sayin don't be mad ;o

You're a retard.



* - Kenny252 - Feb 2, 2012

(Feb 2, 2012 06:52 AM)marvinn Wrote:  u mad bro? It would be easyer to do it like Class.Encrypt() then New class().Encrypt().. Just sayin don't be mad ;o

Wasnt mad but yeah I get what your saying.