public class Signatures extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
hashSign(byte[] bs,
MessageDigest digest)
散列签名的方法
|
static byte[] |
hashSignBytes(byte[] bs,
MessageDigest digest)
散列签名的方法
|
static String |
hmacHashSign(byte[] bs,
byte[] key,
SecretKeySpecMode mode)
hmac + hash签名
|
static byte[] |
hmacHashSignBytes(byte[] bs,
byte[] key,
SecretKeySpecMode mode)
hmac + hash签名
|
static String |
hmacMd5(byte[] bs,
byte[] key)
hmac + md5签名
|
static String |
hmacMd5(String s,
String key)
hmac + md5签名
|
static String |
hmacSha1(byte[] bs,
byte[] key)
hmac + sha1签名
|
static String |
hmacSha1(String s,
String key)
hmac + sha1签名
|
static String |
hmacSha224(byte[] bs,
byte[] key)
hmac + sha224签名
|
static String |
hmacSha224(String s,
String key)
hmac + sha224签名
|
static String |
hmacSha256(byte[] bs,
byte[] key)
hmac + sha256签名
|
static String |
hmacSha256(String s,
String key)
hmac + sha256签名
|
static String |
hmacSha384(byte[] bs,
byte[] key)
hmac + sha384签名
|
static String |
hmacSha384(String s,
String key)
hmac + sha384签名
|
static String |
hmacSha512(byte[] bs,
byte[] key)
hmac + sha512签名
|
static String |
hmacSha512(String s,
String key)
hmac + sha512签名
|
static String |
hmacSign(byte[] bs,
byte[] key,
SecretKeySpecMode mode)
hmac + hash签名
|
static String |
hmacSign(String s,
String key,
SecretKeySpecMode mode)
hmac + hash签名
|
static String |
md5(byte[] bs)
MD5签名
|
static String |
md5(byte[] bs,
byte[] salt)
MD5签名
|
static String |
md5(byte[] bs,
byte[] salt,
int times)
MD5签名
|
static String |
md5(String s)
MD5签名
|
static String |
md5(String s,
String salt)
MD5签名
|
static String |
md5(String s,
String salt,
int times)
MD5签名
|
static String |
sha1(byte[] bs)
SHA1签名
|
static String |
sha1(String s)
SHA1签名
|
static String |
sha224(byte[] bs)
SHA224签名
|
static String |
sha224(String s)
SHA224签名
|
static String |
sha256(byte[] bs)
SHA256签名
|
static String |
sha256(String s)
SHA256签名
|
static String |
sha384(byte[] bs)
SHA384签名
|
static String |
sha384(String s)
SHA384签名
|
static String |
sha512(byte[] bs)
SHA512签名
|
static String |
sha512(String s)
SHA512签名
|
static String |
sign(byte[] bs,
String type)
hash签名
|
static String |
sign(String s,
String type)
hash签名
|
static String |
toHex(byte[] bs) |
public static String md5(byte[] bs)
bs - 明文public static String md5(byte[] bs, byte[] salt)
bs - 明文salt - 盐public static String md5(String s, String salt, int times)
s - 明文salt - 盐times - 签名次数public static String md5(byte[] bs, byte[] salt, int times)
bs - 明文salt - 盐times - 签名次数public static String sha1(byte[] bs)
bs - 明文public static String sha224(byte[] bs)
bs - 明文public static String sha256(byte[] bs)
bs - 明文public static String sha384(byte[] bs)
bs - 明文public static String sha512(byte[] bs)
bs - 明文public static String sign(String s, String type)
s - 明文type - 签名类型 MD5 SHA-1 SHA-224 SHA-256 SHA-384 SHA-512public static String sign(byte[] bs, String type)
bs - 明文type - 签名类型 MD5 SHA-1 SHA-224 SHA-256 SHA-384 SHA-512public static String hashSign(byte[] bs, MessageDigest digest)
bs - 明文digest - MessageDigestpublic static byte[] hashSignBytes(byte[] bs,
MessageDigest digest)
bs - 明文digest - MessageDigestpublic static String hmacMd5(String s, String key)
s - 明文key - keypublic static String hmacMd5(byte[] bs, byte[] key)
bs - 明文key - keypublic static String hmacSha1(String s, String key)
s - 明文key - keypublic static String hmacSha1(byte[] bs, byte[] key)
bs - 明文key - keypublic static String hmacSha224(String s, String key)
s - 明文key - keypublic static String hmacSha224(byte[] bs, byte[] key)
bs - 明文key - keypublic static String hmacSha256(String s, String key)
s - 明文key - keypublic static String hmacSha256(byte[] bs, byte[] key)
bs - 明文key - keypublic static String hmacSha384(String s, String key)
s - 明文key - keypublic static String hmacSha384(byte[] bs, byte[] key)
bs - 明文key - keypublic static String hmacSha512(String s, String key)
s - 明文key - keypublic static String hmacSha512(byte[] bs, byte[] key)
bs - 明文key - keypublic static String hmacSign(String s, String key, SecretKeySpecMode mode)
s - 明文key - keymode - SecretKeySpecModepublic static String hmacSign(byte[] bs, byte[] key, SecretKeySpecMode mode)
bs - 明文key - keymode - SecretKeySpecModepublic static String hmacHashSign(byte[] bs, byte[] key, SecretKeySpecMode mode)
bs - 明文key - keymode - SecretKeySpecModepublic static byte[] hmacHashSignBytes(byte[] bs,
byte[] key,
SecretKeySpecMode mode)
bs - 明文key - keymode - SecretKeySpecModepublic static String toHex(byte[] bs)
Copyright © 2025. All rights reserved.