Hello. I am writing a program to protect information in the laboratory, in which there is the following task:

Encrypt the file with accounts using CryptoAPI using a session key. The hashing algorithm used is MD5 .

Tell me, tell me how to work with CryptoAPI in C ++ Builder. How to encrypt files using MD5 and what is the stream type of symmetric encryption ?

  • MD5 is not encryption, but hashing. - Vladimir Martyanov

1 answer 1

Related Help: Using the Crypto API . The article’s encryption section provides examples of calling the CryptEncryptMessage and CryptDecryptMessage functions. In C ++ Builder, you can work with these functions as you would any other Windows API functions.

Symmetric algorithms use the same secret key for encryption and decryption. In streaming flavors, the coding unit is one bit. And the result of the encoding operation does not affect the already passed stream. It is necessary in cases where the encryption operation may accidentally terminate.

  • IMHO, better than CryptEncrypt - just data encryption. - Vladimir Martyanov