J
JamesDeckert
I've implemented an AES encryption process I found
'' AES.dll and Main() were created by Dr. Brian Gladman.
''
'' fp.gladman.plus.com
''
The code is found on his website and on a thread here also.
It uses a DLL.
Dr. Gladman
Occasionally Access loses contact with the DLL and gives an error when
trying to call the DLL function. If I close and reopen the DB it begins
working again. I’m not aware of any consistant pattern which causes this. I
changed the path to the dll from the absolute to just “AES.DLL†so that I
that the dll could be in a user defined directory as long as it is in the
same directory as the .mdb database.
Private Declare Function AesBlkLen Lib "aes.dll" Alias "_aes_blk_len@8"
(ByVal N As Long, C As AESctx) As Integer
Private Declare Function AesEncKey Lib "aes.dll" Alias "_aes_enc_key@12" (K
As KeyBlk, ByVal N As Long, C As AESctx) As Integer
Private Declare Function AesDecKey Lib "aes.dll" Alias "_aes_dec_key@12" (K
As KeyBlk, ByVal N As Long, C As AESctx) As Integer
Private Declare Function AesEncBlk Lib "aes.dll" Alias "_aes_enc_blk@12" (Ib
As IoBlk, Ob As IoBlk, C As AESctx) As Integer
Private Declare Function AesDecBlk Lib "aes.dll" Alias "_aes_dec_blk@12" (Ib
As IoBlk, Ob As IoBlk, C As AESctx) As Integer
However, I’ve yet to get the AES routine to function on my test machine
which doesn’t contain MS Office but only the Access runtime. It always gives
the error when calling the DLL.
Is there some kind of registration that needs to happen when a "Private
Declare Function" is used?
Since I’m getting sporadic results even on the computer that works, I’d
prefer to translate the AES.DLL code into VBA and include it as a module in
Access. This will eliminate this problem. Dr. Gladman has several versions of
the source code on his website written in C and assembly.
Has anyone translated the AES encryption/decryption to VBA?
I may end up attempting it but there are several versions for several
processors and several files which make up the project. I've done some
initial looking at the code but I haven't found the correct piece(s) yet.
Thanks,
James
'' AES.dll and Main() were created by Dr. Brian Gladman.
''
'' fp.gladman.plus.com
''
The code is found on his website and on a thread here also.
It uses a DLL.
Dr. Gladman
Occasionally Access loses contact with the DLL and gives an error when
trying to call the DLL function. If I close and reopen the DB it begins
working again. I’m not aware of any consistant pattern which causes this. I
changed the path to the dll from the absolute to just “AES.DLL†so that I
that the dll could be in a user defined directory as long as it is in the
same directory as the .mdb database.
Private Declare Function AesBlkLen Lib "aes.dll" Alias "_aes_blk_len@8"
(ByVal N As Long, C As AESctx) As Integer
Private Declare Function AesEncKey Lib "aes.dll" Alias "_aes_enc_key@12" (K
As KeyBlk, ByVal N As Long, C As AESctx) As Integer
Private Declare Function AesDecKey Lib "aes.dll" Alias "_aes_dec_key@12" (K
As KeyBlk, ByVal N As Long, C As AESctx) As Integer
Private Declare Function AesEncBlk Lib "aes.dll" Alias "_aes_enc_blk@12" (Ib
As IoBlk, Ob As IoBlk, C As AESctx) As Integer
Private Declare Function AesDecBlk Lib "aes.dll" Alias "_aes_dec_blk@12" (Ib
As IoBlk, Ob As IoBlk, C As AESctx) As Integer
However, I’ve yet to get the AES routine to function on my test machine
which doesn’t contain MS Office but only the Access runtime. It always gives
the error when calling the DLL.
Is there some kind of registration that needs to happen when a "Private
Declare Function" is used?
Since I’m getting sporadic results even on the computer that works, I’d
prefer to translate the AES.DLL code into VBA and include it as a module in
Access. This will eliminate this problem. Dr. Gladman has several versions of
the source code on his website written in C and assembly.
Has anyone translated the AES encryption/decryption to VBA?
I may end up attempting it but there are several versions for several
processors and several files which make up the project. I've done some
initial looking at the code but I haven't found the correct piece(s) yet.
Thanks,
James