Skip to Content

Encryption/Decryption of Password


     I just want to share my simple Class to Encrypt and Decrypt your text or password. I usually used this when saving as Password in my UDT.

  •      You can download this DLL here. The file password is “SAP”
  •      This class is compatible in any platform, platform means (x64 or x86).
    • After you download, just add it to your project reference.
    • You can declare your own Signature for encryption.

Here’s a sample screenshot for this function:

  1. The first textbox was the Normal Text.
  2. The second textbox was the Encrypted Text.
  3. 3rd was the Decrypted Text.


How to use:


Dim oEncryp As New Encrypt_Decrypt.Encrypt_Decrypt(“@SAP_SCN”)





Hope this helped you in your every coding 🙂 .

Don’t forget to RATE and LIKE this content 😉


You must be Logged on to comment or reply to a post.
  • Hi Bryan,

    sorry to have to rain on your parade here, but I feel it’s necessary to point out to anyone reading this that your function appears to not actually encrypt or decypting anything.

    Instead, it seems to merely obfuscate the input string using a reversible algorithm judging by the fact that the methods don’t require an encryption key.

    Proper encryption relies on a publicly specified, non-secret algorithm such as AES, and a secret key which is used to encrypt or decrypt the text to be protected. Looking at only the method calls, your code seems to not require an encryption key at all, leading me to conclude that it’s not actually doing any encryption at all but probably something similar in (its lack of) security to ROT13.

    If there is no secret key, then the algorithm must be secret in order to guarantee security. Since you’ve published the code, this can’t be the case…

    There are many great encryption algorithms which are in the public domain (i.e. free) and which have been tested and proven to be secure through years or decades of cryptanalysis, various attacks and actual usage. Please just use one of these.



    • Hi Sacha,

           Thank for your comment. I understand it.

      “Instead, it seems to merely obfuscate the input string using a reversible algorithm judging by the fact that the methods don’t require an encryption key.”

      Anyway, in this function I used Cryptography Security by VB.NET.


      • Hi Bryan,

        What Sascha is trying to say is:

        The point of encryption is so that nobody can read your data.

        Since your DLL, does not need a key to encrypt/decrypt, Anybody who can get hold of your DLL file can easily crack your encrypted data.

        My suggestion for improvement is :

        Expose out the Key for your encryption to user.

        Ie. when declaring the object

        Dim oEncrypt as New Encrypt_Decrypt.Encrypt_Decrypt(ENCRYPTION KEY)

        This way only persons who have the encryption key can Decrypt it.



        • Hi Edy,

               You’re right. Thank you for this information. I’m going to update this class. I have that function but I didn’t include in this class.