Encrypt Sample: File Encryption

Click to open or copy the files for the Encrypt sample.

The Encrypt sample is a console application that encrypts files. Files encrypted with this sample can be later decrypted with the Decrypt sample.

Note   Run the Inituser sample (or equivalent) prior to running these samples to create a key container for the default user.

Building SDK Samples

This sample uses the following keywords:

capidecryptfile; capiencryptfile; cryptacquirecontext; cryptcreatehash; cryptdecrypt; cryptderivekey; cryptdestroyhash; cryptdestroykey; cryptencrypt; cryptexportkey; cryptgenkey; cryptgetuserkey; crypthashdata; cryptimportkey; cryptreleasecontext; decryptfile; encryptfile; exit; fclose; feof; ferror; fopen; fread; free; fwrite; getlasterror; malloc; printf