com.github.xiaoyuge5201.encryption.Sha1Utils Maven / Gradle / Ivy
package com.github.xiaoyuge5201.encryption;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Map;
import java.util.Set;
import java.util.SortedMap;
/**
* @author xiaoyuge
*/
public class Sha1Utils {
private static Logger log = LoggerFactory.getLogger(Sha1Utils.class);
@Value("${spring.application.name}")
private static String systemName;
/**
* 签名
*
* @param parameters 参数
* @return 签名
*/
public static String signature(SortedMap