Answers for "what is sha256"

PHP
3

php sha256

echo hash('sha256', $_POST['ppasscode']);
Posted by: Guest on September-23-2020
1

hmac_sha256 node

let test = crypto.createHmac('sha256', "key").update("json").digest("base64");
Posted by: Guest on October-09-2020
-2

sha256 javascript

async function sha256(message) {
    // encode as UTF-8
    const msgBuffer = new TextEncoder().encode(message);                    
    // hash the message
    const hashBuffer = await crypto.subtle.digest('SHA-256', msgBuffer);
    // convert ArrayBuffer to Array
    const hashArray = Array.from(new Uint8Array(hashBuffer));
    // convert bytes to hex string                  
    const hashHex = hashArray.map(b => ('00' + b.toString(16)).slice(-2)).join('');
    return hashHex;
}
Posted by: Guest on March-27-2021

Browse Popular Code Answers by Language