Solved

VB Script - VBA - ActiveX - Encryption/Cryptography question

Posted on 2013-11-25
3
1,007 Views
Last Modified: 2016-11-27
Background :      The company is currently using a "discontinued ActiveX control" (CAPICOM)  and considering WIN7 deprecation issues we've been asked to come up with a plan to migrate off of the  "discontinued ActiveX control" cryptographic library.  

Note :  The business unit currently use SHA1 hashing and AES256 encryption.  

The solution we're seeking to migrate to must use a standard library to implement cryptography.


Microsoft discusses Alternatives to Using Capicom here but we do not see anything that applies to VBA:  http://msdn.microsoft.com/en-us/library/cc778518(VS.85).aspx

 
Question  :    Is there a standard way in VBA code in MS Access or Excel to implement hashing and encryption by setting a reference (early or late binding) or a call to Windows API or some other way?

 i.e..

Call a Windows API function by Declaration:  eg: Private Declare Function GetSystemMenu Lib "user32" (ByVal hWnd As Long, ByVal wRevert As Long) As Long

Early-bind a library by setting a References in Tools.References

Late-bind a library:  Set objVar = CreateObject(“ObjectName.Here”)
0
Comment
Question by:lblinc
  • 2
3 Comments
 

Author Comment

by:lblinc
ID: 39676703
All :     There is no wrong answer here...    Looking for any suggestions, or recommendations.  

I've been doing some research on this issue and have found very little, other than some interesting posts re:  others facing close to a similar task(s)  ...      seeking to migrate off the CAPICOM cryptographic library.
0
 
LVL 45

Accepted Solution

by:
aikimark earned 500 total points
ID: 39680020
There are several options.  In no particular order, you can...
* use Windows Crypto API calls
* use .Net methods, since the encryption namespace has a COM wrapper
* add a module to your project with the code to do the hashing and encryption.
I use Ken Isaacs (kenaso) module in one of my projects.
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=73500&lngWId=1
0
 
LVL 45

Expert Comment

by:aikimark
ID: 41903356
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You cannot be 100% sure that you can protect your organization against crypto ransomware but you can lower down the risk and impact of the infection.
Encryption for Business Encryption (https://en.wikipedia.org/wiki/Encryption) ensures the safety of our data when sending emails. In most cases, to read an encrypted email you must enter a secret key that will enable you to decrypt the email. T…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question