how can hash a variable or strings by javascript???
i didnt find a way to hashing strings or variables by js .
i want to hash my variables to sha256
.
with php codes we can hash the strings with hash('sha256', $variables)
as well .
<?php
$variables =rand(602,2040);
$var2= "my_String";
$getHash = hash('sha256', $variables);
//or//
$getHash = hash('sha256', $var2);
but in js . how should it be done?
is there any same method or function to hash variables / strings with javascript?