com.lazycece.au.api.params.utils.SaltUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of au-api-params Show documentation
Show all versions of au-api-params Show documentation
Parameter signature, encryption and decryption .
package com.lazycece.au.api.params.utils;
import java.math.BigInteger;
import java.util.UUID;
/**
* @author lazycece
* @date 2019/11/20
*/
public class SaltUtils {
public static String generateSalt() {
String uuid = UUID.randomUUID().toString().replaceAll("-", "");
String sn = new BigInteger(uuid, 16).toString();
return sn.substring(0, 6);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy