Set_SM2_KeyPair方法

YT699

Set_SM2_KeyPair方法

方法原型: Set_SM2_KeyPair(PriKey As String,PubKeyX As String,PubKeyY As String,sm2UserName As String,InPath  As String) As Integer

功能:将密钥对设置到锁中

参数1--
PriKey(string);要设置的密钥对中的私钥

参数2――PubKeyX(string);要设置的密钥对中的公钥部分的X坐标

参数3――PubKeyY(string);要设置的密钥对中的公钥部分的Y坐标

参数4――sm2UserName(string);要设置到锁中的用户身份,主要是用于数字签名,以确定签名者的身份。

参数5――InPath (string);加密锁所在的设备路径


返回结果--若函数返回
0或LastError属性为0,则表示函数执行成功,若返回其它值, 则表示函数失败,错误原因可以参见错误代码含义。

 

提示:sm2UserName用户身份主要是用于数字签名,当使用锁对信息进行签名时,设置在锁中的签名会参与到签名中,以便识别签名者的身份