public class Signer extends Object
| Constructor and Description |
|---|
Signer() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
HmacSHA1Sign(String stringToSign,
String secret)
HmacSHA1 Signature
|
static byte[] |
HmacSHA1SignByBytes(String stringToSign,
byte[] secret)
HmacSHA1 Signature
|
static byte[] |
HmacSHA256Sign(String stringToSign,
String secret)
HmacSHA256 Signature
|
static byte[] |
HmacSHA256SignByBytes(String stringToSign,
byte[] secret)
HmacSHA256 Signature
|
static byte[] |
HmacSM3Sign(String stringToSign,
String secret)
HmacSM3 Signature
|
static byte[] |
HmacSM3SignByBytes(String stringToSign,
byte[] secret)
HmacSM3 Signature
|
static byte[] |
MD5Sign(String stringToSign)
MD5 Signature
|
static byte[] |
MD5SignForBytes(byte[] bytesToSign)
MD5 Signature
|
static byte[] |
SHA256withRSASign(String stringToSign,
String secret)
SHA256withRSA Signature
|
public static byte[] HmacSHA1Sign(String stringToSign, String secret) throws Exception
stringToSign - stringsecret - stringExceptionpublic static byte[] HmacSHA1SignByBytes(String stringToSign, byte[] secret) throws Exception
stringToSign - stringsecret - bytesExceptionpublic static byte[] HmacSHA256Sign(String stringToSign, String secret) throws Exception
stringToSign - stringsecret - stringExceptionpublic static byte[] HmacSHA256SignByBytes(String stringToSign, byte[] secret) throws Exception
stringToSign - stringsecret - bytesExceptionpublic static byte[] HmacSM3Sign(String stringToSign, String secret) throws Exception
stringToSign - stringsecret - stringExceptionpublic static byte[] HmacSM3SignByBytes(String stringToSign, byte[] secret) throws Exception
stringToSign - stringsecret - bytesExceptionpublic static byte[] SHA256withRSASign(String stringToSign, String secret) throws Exception
stringToSign - stringsecret - stringExceptionpublic static byte[] MD5Sign(String stringToSign) throws Exception
stringToSign - stringExceptionCopyright © 2022. All rights reserved.