Solved

VB Script - VBA - ActiveX - Encryption/Cryptography question

Posted on 2013-11-25
3
985 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Cybersecurity has become the buzzword of recent years and years to come. The inventions of cloud infrastructure and the Internet of Things has made us question our online safety. Let us explore how cloud- enabled cybersecurity can help us with our b…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

706 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now