0

How would I SHA256 encrypt each line in a csv file in Windows?

It's a simple csv file of email addresses and I want that converted to SHA256 hashes, not the clear text emails.

macOS/Linux is my home OS, so I'm a little lost to know if this is possible on Windows?

Kong
  • 8,792
  • 15
  • 68
  • 98
  • SHA256 can't be decrypted, so is the idea that you'll take a user input, hash it, and then compare the hash against what's in the csv file? And typically email addresses aren't considered sensitive information so you wouldn't need to hash them. If you're storing passwords as well, you would definitely want to hash those though (and include a unique salt per record), but typically password hashing would be done via bcrypt or argon2 instead of sha256. – tigeravatar May 17 '19 at 18:07
  • I think @tigeravatar hints at the right point here. Why are you doing this? Perhaps there is a better solution to the problem you are trying to solve. – TheMadTechnician May 17 '19 at 19:11
  • I think Powershell uses the .Net Framework, so you can compute a SHA256 hash with `System.Security.Cryptography.SHA256`. – t.m.adam May 18 '19 at 11:22

0 Answers0