document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. # Add the BCrypt Types/Classes (here I am using Bcrypt from Chocolatey)
  2. Add-Type -Path C:\\Chocolatey\\lib\\BCrypt.Net.0.1.0\\lib\\net35\\BCrypt.Net.dll
  3. # Import our module
  4. Import-Module .\\BCrypt.psm1
  5. # Set a workfactor
  6. $workfactor = 10
  7. # Create a hash of alice\'s password
  8. $alicehash = Get-BCryptHash -InputString "My Password" -WorkFactor $workfactor
  9. # display the password
  10. $alicehash
  11. # test the plain text "Evil Hacker" against the hash, will return false
  12. Test-bCryptHash -PlainText "Evil hacker" -Hash $alicehash
  13. # test the plain text "My Password" against the hash, will return true
  14. Test-bCryptHash -PlainText "My Password" -Hash $alicehash
  15.  
  16. # Code Snippet from aperturescience.su
');