public static String getAuthSignature(final String usrName,
            final String usrPassWord,
            long timestamp, int randomValue) {
        Base64 base64 = new Base64();
        StringBuilder sbuf = new StringBuilder(512);
        byte[] baseStr =
                base64.encode(new HmacUtils(HmacAlgorithms.HMAC_SHA_1, usrPassWord)
                        .hmac(sbuf.append(usrName)
                                .append(timestamp)
                                .append(randomValue)
                                .toString()));
        sbuf.delete(0, sbuf.length());
        String signature = "";
        try {
            signature = URLEncoder.encode(new String(baseStr,
                    TBaseConstants.META_DEFAULT_CHARSET_NAME),
                    TBaseConstants.META_DEFAULT_CHARSET_NAME);
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        return signature;
    }
Get the authorization signature based on the provided values
base64.encode(hmacSha1(password, username, timestamp, random number))

@param usrName       the user name
@param usrPassWord   the password of username
@param timestamp     the time stamp
@param randomValue   the random value
inlong-tubemq/tubemq-core/src/main/java/org/apache/inlong/tubemq/corebase/utils/TStringUtils.java