1*be2b34faSKees Cook#!/bin/sh
2*be2b34faSKees Cook# SPDX-License-Identifier: GPL-2.0
3*be2b34faSKees Cook
4*be2b34faSKees CookSEED=$(od -A n -t x8 -N 32 /dev/urandom | tr -d ' \n')
5*be2b34faSKees Cookecho "$SEED" > "$1"
6*be2b34faSKees CookHASH=$(echo -n "$SEED" | sha256sum | cut -d" " -f1)
7*be2b34faSKees Cookecho "#define RANDSTRUCT_HASHED_SEED \"$HASH\"" > "$2"
8