import { createHash } from 'crypto' ; export const sha512 = async ( ... data ) => data . map ( ( item ) => ( typeof item === 'string' ? Buffer . from ( item ) : item ) ) . reduce ( ( hash , item ) => hash . update ( item ) , createHash ( 'sha512' ) ) . digest ( ) ;