Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Encrypting using user's password

I want to encrypt a given data using the log-in user's password on a windows machine using WINAPI. I've been looking for a function that uses a token (or something like that) but I couldn't find one.

Does anyone know how to do that?

Thanks! :-)

like image 365
TCS Avatar asked Sep 06 '11 10:09

TCS


1 Answers

The Windows Data Protection API sounds like what you need. The CryptProtectData and CryptUnprotectData functions perform encryption using the logon credentials of the current user.

like image 89
R. Martinho Fernandes Avatar answered Oct 07 '22 22:10

R. Martinho Fernandes