public static String generateParameterHash ( String path , String func , List < String > args ) { logger . debug ( String . format ( "GenerateParameterHash : path=%s, func=%s, args=%s" , path , func , args ) ) ; // Append the arguments StringBuilder param = new StringBuilder ( path ) ; param . append ( func ) ; args . forEach ( param :: append ) ; // Compute the hash String strHash = Hex . toHexString ( hash ( param . toString ( ) . getBytes ( ) , new SHA3Digest ( ) ) ) ; return strHash ; }
Generate parameter hash for the given chain code path func and args