162306a36Sopenharmony_ci#!/bin/sh 262306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0 362306a36Sopenharmony_ci 462306a36Sopenharmony_ciSEED=$(od -A n -t x8 -N 32 /dev/urandom | tr -d ' \n') 562306a36Sopenharmony_ciecho "$SEED" > "$1" 662306a36Sopenharmony_ciHASH=$(echo -n "$SEED" | sha256sum | cut -d" " -f1) 762306a36Sopenharmony_ciecho "#define RANDSTRUCT_HASHED_SEED \"$HASH\"" > "$2" 8