export function generateRandomHexString ( ) { const size = 16 ; const randomValues = [ ... crypto . getRandomValues ( new Uint8Array ( size ) ) ] ; return randomValues . map ( val => ( '00' + val . toString ( 16 ) ) . slice ( - 2 ) ) . join ( '' ) ; }