代码拉取完成,页面将自动刷新
同步操作将从 李宋长雷兴/SM2-signature-creation-and-verification 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
/**************************************************
* File name: sm3_with_preprocess.h
* Author: HAN Wei
* Author's blog: https://blog.csdn.net/henter/
* Date: Nov 17th, 2018
* Description: declare SM3 hash calculation with
preprocess functions
* Note: SM3 digest with preprocess instead of "pure"
SM3 digest is used as one input item in computation
of SM2 signature.
**************************************************/
#ifndef HEADER_SM3_DIGEST_WTIH_PREPROCESS_COMPUTATION_H
#define HEADER_SM3_DIGEST_WTIH_PREPROCESS_COMPUTATION_H
#ifdef __cplusplus
extern "C" {
#endif
/**************************************************
* Name: sm3_digest_z
* Function: compute digest of leading Z in SM3 preprocess
* Parameters:
id[in] user id
id_len[in] user id length, size in bytes
pub_key[in] SM2 public key
digest[out] digest value on Z
* Return value:
0: function executes successfully
any other value: an error occurs
* Notes:
1. The user id value cannot be NULL. If the specific
value is unknown, the default user id "1234567812345678"
can be used.
2. "pub_key" is a octet string of 65 byte length. It
is a concatenation of 04 || X || Y. X and Y both are
SM2 public key coordinates of 32-byte length.
**************************************************/
int sm3_digest_z(const unsigned char *id,
const int id_len,
const unsigned char *pub_key,
unsigned char *z_digest);
/**************************************************
* Name: sm3_digest_with_preprocess
* Function: compute SM3 digest with preprocess
* Parameters:
message[in] input message
message_len[in] input message length, size in bytes
id[in] user id
id_len[in] user id length, size in bytes
pub_key[in] SM2 public key
digest[out] digest value of SM3 preprocess
* Return value:
0: function executes successfully
any other value: an error occurs
* Notes:
1. The user id value cannot be NULL. If the specific
value is unknown, the default user id "1234567812345678"
can be used.
2. "pub_key" is a octet string of 65 byte length. It
is a concatenation of 04 || X || Y. X and Y both are
SM2 public key coordinates of 32-byte length.
**************************************************/
int sm3_digest_with_preprocess(const unsigned char *message,
const int message_len,
const unsigned char *id,
const int id_len,
const unsigned char *pub_key,
unsigned char *digest);
#ifdef __cplusplus
}
#endif
#endif /* end of HEADER_SM3_DIGEST_WTIH_PREPROCESS_COMPUTATION_H */
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。