VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Encryption/Decryption using CryptoAPI

BarryDunne  (3 Submissions)   Encryption   Visual Basic 3.0   Beginner   Wed 3rd February 2021

This is a module that you can add to your project to encrypt/decrypt using the CryptoAPI. This is the standard API used regardless of who provides the dll which actually does the encryption. Microsoft give you one such dll as standard with windows or NT, but the API ensures that you have the same interface to anyone elses, or even write your own. These different encryption dlls are called Cryptographic Service Providers (CSP's) and the standard Microsoft one is called "Microsoft Base Cryptographic Provider v1.0". To use a different CSP all you have to do is change a constant in this module. This module ensures that there are no carriage returns or line feeds in the encrypted value so that you can easily write it to an ini file for example. This version contains a fix to the original version.

Inputs
There are two main functions: ' 'Function EncryptData(ByVal Data As String, ByVal Password As String) As String ' Where Data is the String to encrypt and password is used to encrypt it ' 'Function DecryptData(ByVal Data As String, ByVal Password As String) As String ' Where Data is the encrypted String and password is used to decrypt it

Rate Encryption/Decryption using CryptoAPI (8(8 Vote))
Encryption/Decryption using CryptoAPI.bas

Encryption/Decryption using CryptoAPI Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters