import { BinaryToTextEncoding , createHash } from 'crypto' ; function sha256 ( str , encoding = 'hex' ) { return createHash ( 'sha256' ) . update ( str ) . digest ( encoding ) ; } function sha1 ( str , encoding = 'hex' ) { return createHash ( 'sha1' ) . update ( str ) . digest ( encoding ) ; } function randomInt ( low , high ) { return Math . floor ( Math . random ( ) * ( high - low ) + low ) ; } export { randomInt , sha256 , sha1 } ;