Bash sha256 sample code
#!/bin/bash

encode() {
    echo -n "$1" | sha256sum | cut -d' ' -f1
}

input="1234567"
encoded=$(encode "$input")
echo "Encoded: $encoded"
SHA256Hash Code Sample