9 lines · 305 B · Shell
RawDownload
#!/bin/sh# SPDX-License-Identifier: GPL-2.0 if [ ! -f "$1" ]; then	SEED=`od -A n -t x8 -N 32 /dev/urandom | tr -d ' \n'`	echo "const char *randstruct_seed = \"$SEED\";" > "$1"	HASH=`echo -n "$SEED" | sha256sum | cut -d" " -f1 | tr -d ' \n'`	echo "#define RANDSTRUCT_HASHED_SEED \"$HASH\"" > "$2"fi

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t