G
gardenofsimple
Hi everyone!
I just wanted some opinions before I gave up on this solution
altogether and found another way. I know that there are many ways to
solve this problem, it's just that this one seemed simple and elegant
(until it didn't work!)
The givens are that a) I must use Access 2000 and b) I am stuck
with .net Framework 2.0. I cannot upgrade either of these products.
I'm sorry. I realize that upgrading both would most likely solve this
instantly.
So: working within these constraints, what I wanted to do was write a
very short VBA module to encrypt a few strings using the SHA512
algorithm.
I wanted to use the SHA512 class from the System.Security.Cryptography
namespace:
http://msdn.microsoft.com/en-us/library/system.security.cryptography.sha512(VS.80).aspx
However, I can't get it to work.
1) I can add mscorlib.dll as a reference.
2) I can create an instance of SHA512 -- Dim x As New SHA512
The problem occurs when I try to use the ComputeHash method. The code
y = x.ComputeHash(z) causes VBA to return the runtime error "Invalid
procedure call or argument".
When I look at the SHA512 class in Object Browser, it contains no
members. This is really puzzling to me.
So my question is: why would the Object Browser show no members and
yet VBA is willing to let me create an instance of this class?
Is there something simple I'm missing here? Or is this never going to
work.
Thanks for your help.
C.
I just wanted some opinions before I gave up on this solution
altogether and found another way. I know that there are many ways to
solve this problem, it's just that this one seemed simple and elegant
(until it didn't work!)
The givens are that a) I must use Access 2000 and b) I am stuck
with .net Framework 2.0. I cannot upgrade either of these products.
I'm sorry. I realize that upgrading both would most likely solve this
instantly.
So: working within these constraints, what I wanted to do was write a
very short VBA module to encrypt a few strings using the SHA512
algorithm.
I wanted to use the SHA512 class from the System.Security.Cryptography
namespace:
http://msdn.microsoft.com/en-us/library/system.security.cryptography.sha512(VS.80).aspx
However, I can't get it to work.
1) I can add mscorlib.dll as a reference.
2) I can create an instance of SHA512 -- Dim x As New SHA512
The problem occurs when I try to use the ComputeHash method. The code
y = x.ComputeHash(z) causes VBA to return the runtime error "Invalid
procedure call or argument".
When I look at the SHA512 class in Object Browser, it contains no
members. This is really puzzling to me.
So my question is: why would the Object Browser show no members and
yet VBA is willing to let me create an instance of this class?
Is there something simple I'm missing here? Or is this never going to
work.
Thanks for your help.
C.