13 lines
275 B
Plaintext
Executable File
13 lines
275 B
Plaintext
Executable File
#!/usr/bin/env nix-shell
|
|
#!nix-shell -i bash -p bash
|
|
file="$1"
|
|
enc="$2"
|
|
nibbles="$3"
|
|
echo "$file" | cat /dev/stdin /etc/ssh/host_keys/ssh_host_ed25519_key \
|
|
| sha512sum \
|
|
| cut -c "1-$nibbles" \
|
|
| tr a-z A-Z \
|
|
| basenc -d --base16 \
|
|
| basenc "--$enc" \
|
|
> "$file"
|