public class AesUtils extends Object
构造器和说明 |
---|
AesUtils(byte[] key) |
限定符和类型 | 方法和说明 |
---|---|
static String |
createSign(Map<String,String> map,
String mchKey) |
static byte[] |
decryptToByte(byte[] nonce,
byte[] cipherData,
byte[] key) |
static byte[] |
decryptToByte(byte[] associatedData,
byte[] nonce,
byte[] cipherData,
byte[] key) |
String |
decryptToString(byte[] associatedData,
byte[] nonce,
String ciphertext) |
static String |
decryptToString(String associatedData,
String nonce,
String ciphertext,
String apiV3Key) |
static String |
HMACSHA256(String data,
String key) |
public static byte[] decryptToByte(byte[] nonce, byte[] cipherData, byte[] key) throws GeneralSecurityException
public static byte[] decryptToByte(byte[] associatedData, byte[] nonce, byte[] cipherData, byte[] key) throws GeneralSecurityException
public String decryptToString(byte[] associatedData, byte[] nonce, String ciphertext) throws GeneralSecurityException, IOException
public static String decryptToString(String associatedData, String nonce, String ciphertext, String apiV3Key) throws GeneralSecurityException, IOException
Copyright © 2023. All rights reserved.