#!/bin/bash key=hello name=$1 hash=$(echo -n "$name$key" | sha256sum | xxd -r -p | base64 | tr -d '+/') echo "${hash:0:8}-${hash:8:8}"