using Org.BouncyCastle.Crypto;
using Org.BouncyCastle.Crypto.Parameters;
using Org.BouncyCastle.Math;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SMCryptoUtils
{
    public interface IEasyGmUtils
    {
        BigInteger fromUnsignedByteArray(byte[] var0, int var1, int var2);
        ECPrivateKeyParameters getPrivatekeyFromD(BigInteger d);
        ECPublicKeyParameters getPublickeyFromXY(BigInteger x, BigInteger y);
        byte[] signSm3WithSm2(byte[] msg, byte[] userId, byte[] privateKeyBytes);
        byte[] signSm3WithSm2Asn1Rs(byte[] msg, byte[] userId, AsymmetricKeyParameter privateKey);
        byte[] sm2Decrypt(byte[] data, AsymmetricKeyParameter key);
        byte[] sm2DecryptOld(byte[] data, AsymmetricKeyParameter key);
        byte[] sm2Encrypt(byte[] data, AsymmetricKeyParameter key);
        byte[] sm2EncryptOld(byte[] data, AsymmetricKeyParameter pubkey);
        byte[] sm3(byte[] bytes);
        byte[] sm4Decrypt(byte[] keyBytes, byte[] cipher);
        byte[] sm4DecryptCBC(byte[] keyBytes, byte[] cipher, byte[] iv, string algo);
        byte[] sm4DecryptECB(byte[] keyBytes, byte[] cipher, string algo);
        byte[] sm4Encrypt(byte[] keyBytes, byte[] plain);
        byte[] sm4EncryptCBC(byte[] keyBytes, byte[] plain, byte[] iv, string algo);
        byte[] sm4EncryptECB(byte[] keyBytes, byte[] plain, string algo);
        bool verifySm3WithSm2(byte[] msg, byte[] userId, byte[] rs, byte[] publicKeyBytes);
        bool verifySm3WithSm2Asn1Rs(byte[] msg, byte[] userId, byte[] sign, AsymmetricKeyParameter publicKey);
        byte[] zeroIv(string algo);
    }
}
