Search code examples
cencryptionencodesha256

encrypt file with SHA256 using C/C++


How can I encode a file using sha256 and c/c++ ??? Thanks!


Solution

  • SHA 256 stands for Secure Hash Algorithm ! It will only produce the hash of a given file . You can't retrieve the original file from a given hash otherwise hash functions are useless.

    If you want to do encryption/decryption AES would be a better solution. Everything you need is in OpenSSL.