类 SmUtils
java.lang.Object
org.cattleframework.security.crypto.SmUtils
国密工具
- 作者:
- orange
-
方法概要
修饰符和类型方法说明static KeyPairstatic byte[]static byte[]generateSm4Iv(PaddingType paddingType) static PrivateKeygetSm2PrivateKey(byte[] privateKey) static PublicKeygetSm2PublicKey(byte[] publicKey) static byte[]sm2Decrypt(byte[] encryptData, org.bouncycastle.crypto.engines.SM2Engine.Mode mode, PrivateKey privateKey) static byte[]sm2Encrypt(byte[] data, org.bouncycastle.crypto.engines.SM2Engine.Mode mode, PublicKey publicKey) static byte[]sm2Sign(byte[] data, PrivateKey privateKey) static booleanstatic byte[]sm3(byte[] data) static byte[]sm4DecryptCbc(byte[] encryptData, byte[] key, byte[] iv, PaddingType paddingType) static byte[]sm4DecryptEcb(byte[] encryptData, byte[] key, PaddingType paddingType) static byte[]sm4EncryptCbc(byte[] data, byte[] key, byte[] iv, PaddingType paddingType) static byte[]sm4EncryptEcb(byte[] data, byte[] key, PaddingType paddingType)
-
方法详细资料
-
generateSm2CryptoKey
-
getSm2PublicKey
-
getSm2PrivateKey
-
sm2Encrypt
public static byte[] sm2Encrypt(byte[] data, org.bouncycastle.crypto.engines.SM2Engine.Mode mode, PublicKey publicKey) -
sm2Decrypt
public static byte[] sm2Decrypt(byte[] encryptData, org.bouncycastle.crypto.engines.SM2Engine.Mode mode, PrivateKey privateKey) -
sm2Sign
-
sm2Verify
-
sm3
public static byte[] sm3(byte[] data) -
generateSm4CryptoKey
public static byte[] generateSm4CryptoKey() -
generateSm4Iv
-
sm4EncryptCbc
-
sm4DecryptCbc
public static byte[] sm4DecryptCbc(byte[] encryptData, byte[] key, byte[] iv, PaddingType paddingType) -
sm4EncryptEcb
-
sm4DecryptEcb
-