Documentation ¶
Index ¶
- Constants
- func SdfCloseSession(session int64) int32
- func SdfCreateFile(session int64, fileName string, fileSize uint32) int32
- func SdfDeleteFile(session int64, fileName string) int32
- func SdfExit()
- func SdfInit(libPath string) error
- func SdfOpenSession() int64
- func SdfReadFile(session int64, fileName string, offSet, readLen uint32) (int32, []byte)
- func SdfSm2ExtKeyVerify(session int64, pubKey ECCrefPublicKey, buf []byte, len uint32, ...) int32
- func SdfSm3Final(session int64) (int32, [32]byte)
- func SdfSm3Init(session int64) int32
- func SdfSm3Update(session int64, buf []byte, len uint32) int32
- func SdfWriteFile(session int64, fileName string, offSet, writeLen uint32, buf []byte) int32
- type ECCCIPHERBLOB
- type ECCCipher
- type ECCPUBLICKEYBLOB
- type ECCSignature
- type ECCrefPrivateKey
- type ECCrefPublicKey
Constants ¶
View Source
const ( ECCref_MAX_BITS int32 = 512 ECCref_MAX_LEN int32 = ((ECCref_MAX_BITS + 7) / 8) ECC_MAX_XCOORDINATE_BITS_LEN int32 = 512 ECC_MAX_YCOORDINATE_BITS_LEN int32 = ECC_MAX_XCOORDINATE_BITS_LEN ECC_MAX_MODULUS_BITS_LEN int32 = ECC_MAX_XCOORDINATE_BITS_LEN )
Variables ¶
This section is empty.
Functions ¶
func SdfCreateFile ¶
SdfCreateFile:卡中创建文件
func SdfReadFile ¶
SdfReadFile:读取卡中文件,从offset开始读取readLen字节
func SdfSm2ExtKeyVerify ¶
func SdfSm2ExtKeyVerify(session int64, pubKey ECCrefPublicKey, buf []byte, len uint32, sig ECCSignature) int32
SdfSm2ExtKeyVerify:sm2外部key验签
func SdfSm3Final ¶
SdfSm3Update:sm3 final,返回32字节的hash数组
func SdfSm3Update ¶
SdfSm3Update:sm3 update
Types ¶
type ECCCIPHERBLOB ¶
type ECCCIPHERBLOB struct { XCoordinate [ECC_MAX_XCOORDINATE_BITS_LEN / 8]byte YCoordinate [ECC_MAX_XCOORDINATE_BITS_LEN / 8]byte Hash [32]byte CipherLen uint32 Cipher [128]byte }
type ECCPUBLICKEYBLOB ¶
type ECCPUBLICKEYBLOB struct { BitLen uint32 XCoordinate [ECC_MAX_XCOORDINATE_BITS_LEN / 8]byte YCoordinate [ECC_MAX_YCOORDINATE_BITS_LEN / 8]byte }
type ECCSignature ¶
type ECCSignature struct {
// contains filtered or unexported fields
}
func SdfSm2ExtKeySign ¶
func SdfSm2ExtKeySign(session int64, privKey ECCrefPrivateKey, buf []byte, len uint32) (int32, ECCSignature)
SdfSm2ExtKeySign:sm2外部key签名
type ECCrefPrivateKey ¶
type ECCrefPrivateKey struct { K [ECCref_MAX_LEN]byte // contains filtered or unexported fields }
type ECCrefPublicKey ¶
type ECCrefPublicKey struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.