Versions in this module Expand all Collapse all v2 v2.3.6 Nov 4, 2024 v2.3.5 Sep 14, 2024 v2.3.4 May 30, 2024 v2.3.3 Oct 19, 2023 v2.3.2 Jun 25, 2023 v2.3.1 Nov 3, 2022 v2.3.0 Aug 2, 2022 Changes in this version + const SDR_BASE + const SDR_OK + const SGD_3DES_CBC + const SGD_3DES_CFB + const SGD_3DES_CTR + const SGD_3DES_ECB + const SGD_3DES_MAC + const SGD_3DES_OFB + const SGD_AES_CBC + const SGD_AES_CFB + const SGD_AES_CTR + const SGD_AES_ECB + const SGD_AES_MAC + const SGD_AES_OFB + const SGD_FALSE + const SGD_MD5 + const SGD_RSA + const SGD_RSA_ENC + const SGD_RSA_SIGN + const SGD_SHA1 + const SGD_SHA224 + const SGD_SHA256 + const SGD_SHA384 + const SGD_SHA512 + const SGD_SM1_CBC + const SGD_SM1_CFB + const SGD_SM1_CTR + const SGD_SM1_ECB + const SGD_SM1_MAC + const SGD_SM1_OFB + const SGD_SM2 + const SGD_SM2_1 + const SGD_SM2_2 + const SGD_SM2_3 + const SGD_SM3 + const SGD_SM9 + const SGD_SM9_1 + const SGD_SM9_2 + const SGD_SM9_3 + const SGD_SM9_4 + const SGD_SMS4_CBC + const SGD_SMS4_CFB + const SGD_SMS4_CTR + const SGD_SMS4_ECB + const SGD_SMS4_MAC + const SGD_SMS4_OFB + const SGD_SSF33_CBC + const SGD_SSF33_CFB + const SGD_SSF33_CTR + const SGD_SSF33_ECB + const SGD_SSF33_MAC + const SGD_SSF33_OFB + const SGD_TRUE + func CMessage(data []byte) (dataPtr C.SGD_UCHAR_PRT) + func ConvertToECCCipherC(encData ECCCipher) (pucEncData C.ECCCipher) + func ConvertToECCSignatureC(signature ECCSignature) (pSignature C.ECCSignature) + func ConvertToECCrefPrivateKeyC(privateKey ECCrefPrivateKey) (pucPrivateKey C.ECCrefPrivateKey) + func ConvertToECCrefPublicKeyC(publicKey ECCrefPublicKey) (pucPublicKey C.ECCrefPublicKey) + func ToError(e C.SGD_RV) error + type Ctx struct + func New(libPath string) *Ctx + func (c *Ctx) Destroy() + func (c *Ctx) SDFCloseDevice(deviceHandle SessionHandle) (err error) + func (c *Ctx) SDFCloseSession(sessionHandle SessionHandle) (err error) + func (c *Ctx) SDFDecrypt(sessionHandle SessionHandle, hKeyHandle SessionHandle, uiAlgID uint, iv []byte, ...) (data []byte, dataLength uint, err error) + func (c *Ctx) SDFDestroyKey(sessionHandle SessionHandle, hKeyHandle SessionHandle) (err error) + func (c *Ctx) SDFEncrypt(sessionHandle SessionHandle, keyHandle SessionHandle, algID uint, iv []byte, ...) (encData []byte, encDataLength uint, err error) + func (c *Ctx) SDFExportEncPublicKey_ECC(sessionHandle SessionHandle, uiKeyIndex uint) (publicKey ECCrefPublicKey, err error) + func (c *Ctx) SDFExportSignPublicKey_ECC(sessionHandle SessionHandle, uiKeyIndex uint) (publicKey ECCrefPublicKey, err error) + func (c *Ctx) SDFExternalDecrypt_ECC(sessionHandle SessionHandle, uiAlgID uint, privateKey ECCrefPrivateKey, ...) (data []byte, dataLength uint, err error) + func (c *Ctx) SDFExternalEncrypt_ECC(sessionHandle SessionHandle, uiAlgID uint, publicKey ECCrefPublicKey, ...) (encData ECCCipher, err error) + func (c *Ctx) SDFExternalSign_ECC(sessionHandle SessionHandle, uiAlgID uint, privateKey ECCrefPrivateKey, ...) (signature ECCSignature, err error) + func (c *Ctx) SDFExternalVerify_ECC(sessionHandle SessionHandle, uiAlgID uint, publicKey ECCrefPublicKey, ...) (err error) + func (c *Ctx) SDFGenerateKeyPair_ECC(sessionHandle SessionHandle, uiAlgID uint, uiKeyBits uint) (publicKey ECCrefPublicKey, privateKey ECCrefPrivateKey, err error) + func (c *Ctx) SDFGenerateRandom(sessionHandle SessionHandle, length uint) (randomData []byte, err error) + func (c *Ctx) SDFGetDeviceInfo(sessionHandle SessionHandle) (deviceInfo DeviceInfo, err error) + func (c *Ctx) SDFGetPrivateKeyAccessRight(sessionHandle SessionHandle, keyIndex uint, password []byte, pwdLength uint) (err error) + func (c *Ctx) SDFGetSymmKeyHandle(sessionHandle SessionHandle, uiKeyIndex uint) (keyHandle SessionHandle, err error) + func (c *Ctx) SDFImportKey(sessionHandle SessionHandle, pucKey []byte, uiKeyLength uint) (keyHandle SessionHandle, err error) + func (c *Ctx) SDFInternalDecrypt_ECC(sessionHandle SessionHandle, uiISKIndex uint, uiAlgID uint, encData ECCCipher) (data []byte, dataLength uint, err error) + func (c *Ctx) SDFInternalEncrypt_ECC(sessionHandle SessionHandle, uiISKIndex uint, uiAlgID uint, pucData []byte, ...) (encData ECCCipher, err error) + func (c *Ctx) SDFInternalSign_ECC(sessionHandle SessionHandle, uiISKIndex uint, pucData []byte, ...) (signature ECCSignature, err error) + func (c *Ctx) SDFInternalVerify_ECC(sessionHandle SessionHandle, uiISKIndex uint, pucData []byte, ...) (err error) + func (c *Ctx) SDFOpenDevice() (deviceHandle SessionHandle, err error) + func (c *Ctx) SDFOpenSession(deviceHandle SessionHandle) (SessionHandle, error) + func (c *Ctx) SDFReleasePrivateKeyAccessRight(sessionHandle SessionHandle, keyIndex uint) (err error) + type DeviceInfo struct + AsymAlgAbility [2]uint + BufferSize uint + DeviceName string + DeviceSerial string + DeviceVersion uint + HashAlgAbility uint + IssuerName string + StandardVersion uint + SymAlgAbility uint + func ConvertToDeviceInfoGo(deviceInfo1 C.DEVICEINFO) (deviceInfo DeviceInfo) + type DeviceRunStatus struct + Concurrency uint + Cpu uint + Memfree uint + Memtotal uint + Onboot uint + Reserve1 uint + Reserve2 uint + Service uint + type ECCCipher struct + C string + L uint + M string + X string + Y string + func ConvertToECCCipherGo(pucKey C.ECCCipher) (key ECCCipher) + type ECCSignature struct + R string + S string + func ConvertToECCSignatureGo(pucSignature C.ECCSignature) (signature ECCSignature) + type ECCrefPrivateKey struct + Bits uint + K string + func ConvertToECCrefPrivateKeyGo(pucPrivateKey C.ECCrefPrivateKey) (privateKey ECCrefPrivateKey) + type ECCrefPublicKey struct + Bits uint + X string + Y string + func ConvertToECCrefPublicKeyGo(pucPublicKey C.ECCrefPublicKey) (publicKey ECCrefPublicKey) + type SessionHandle C.SGD_HANDLE Other modules containing this package chainmaker.org/chainmaker/common/v3