public class MycryptoCiphers extends Object
| 构造器和说明 |
|---|
MycryptoCiphers() |
| 限定符和类型 | 方法和说明 |
|---|---|
static byte[] |
sm3Hash(byte[] inbuf) |
static byte[] |
sm3KDF(byte[] inbuf,
int outbufLen) |
static byte[] |
sm4CbcDecryptWithMac(byte[] encKey,
byte[] macKey,
byte[] ciphertext) |
static byte[] |
sm4CbcEncryptWithMac(byte[] encKey,
byte[] macKey,
byte[] plaintext) |
static byte[] |
sm4CbcEncryptWithMac(byte[] encKey,
byte[] macKey,
byte[] iv,
byte[] plaintext) |
public static byte[] sm3Hash(byte[] inbuf)
inbuf - The input buf to hashpublic static byte[] sm3KDF(byte[] inbuf,
int outbufLen)
outbufLen - Ouput buffer length.inbuf - The input buffer.public static byte[] sm4CbcEncryptWithMac(byte[] encKey,
byte[] macKey,
byte[] plaintext)
encKey - [in ] encryption key data, 16 bytes.macKey - [in ] mac key data, 16 bytesplaintext - [in ] plaintext data, plaintextLen bytepublic static byte[] sm4CbcEncryptWithMac(byte[] encKey,
byte[] macKey,
byte[] iv,
byte[] plaintext)
encKey - [in ] encryption key data, 16 bytes.macKey - [in ] mac key data, 16 bytesiv - [in ] IV, 16 bytes.plaintext - [in ] plaintext data, plaintextLen bytepublic static byte[] sm4CbcDecryptWithMac(byte[] encKey,
byte[] macKey,
byte[] ciphertext)
encKey - [in ] encryption key data, 16 bytes.macKey - [in ] mac key data, 16 bytesciphertext - [in] ciphertext data, ciphertextLen bytes, iv || ciphertext with macCopyright © 2022. All rights reserved.