AES加密一个Microsoft Access字段,通过VBA字段、Microsoft、AES、VBA

2023-09-09 21:22:08 作者:丢了剧本的配角

我需要创建一个Microsoft Access数据库,但有需要,在我的表之一,为单场高度加密。

I need to create a Microsoft Access database, but have a need, in one of my tables, for a single field to be strongly encrypted.

由于AES要求既一个键和一个初始化向量,我已经决定来解决这个问题通过要求一个密码来访问数据库(作为密钥),并且在表中的字段来保存明文的SHA1哈希在加密领域。

Since AES requires both a key and an initialization vector, I've decided to solve this problem by requiring a password to access the database (as the key), and a field in the table to hold a SHA1 hash of the plaintext of the encrypted field.

有谁知道在哪里可以找到VBA兼容code实际做加密?

Does anyone know where I can find VBA-compatible code to actually do the encryption?

推荐答案

一些替代品来从头开始编写它;

Some alternatives to writing it from scratch;

您可以使用本机的CryptoAPI做(根API是 CryptAquireContext ) 您可以使用微软的 CAPICOM 这是COM包装到的CryptoAPI和支持AES 。 您可以使用第三方库,从 ebCrypt 是出色的,简洁的和免费的人。 You can do it with the native CryptoAPI (the root API is CryptAquireContext) You can use Microsoft's CAPICOM which is a COM wrapper to the CryptoAPI and supports AES. You can use a 3rd party library, the one from ebCrypt is excellent, compact and free.