Skip to content

Instantly share code, notes, and snippets.

@AysadKozanoglu
Last active September 14, 2021 13:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AysadKozanoglu/b2a52a303301fd047a40cd3aaadd057b to your computer and use it in GitHub Desktop.
Save AysadKozanoglu/b2a52a303301fd047a40cd3aaadd057b to your computer and use it in GitHub Desktop.
shell php SHA256 hash encryption

sha256enc.php

<?php 

$keystr = $argv[1];

echo "\n\nplain String:\n$keystr \n\nsha256 hash:\n". hash('sha256', $keystr ) ."\n\n" ;

?>

execute in shell console

php sha256enc.php  teststring

###output

plain String:
teststring 

sha256 hash:
3c8727e019a42b444667a587b6001251becadabbb36bfed8087a92c18882d111
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment