package com.xxrv.video.helper;

import com.xxrv.video.util.Base64;
import com.xxrv.video.util.MAC;
import com.xxrv.video.util.Parameter;

import java.util.Map;

public class MessageSecureHelper {
    public static void mac(String messageKey, Map<String, Object> message) {
        String mac = MAC.encodeBase64((Parameter.joinObjectValues(message)).getBytes(), Base64.decode(messageKey));
        message.put("mac", mac);
    }
}
