xlang v5.1 Release
程序设计语言基础库文档
载入中...
搜索中...
未找到
Signature类 参考
Signature 的协作图:
Collaboration graph

Public 成员函数

静态 Public 成员函数

静态 Public 属性

详细描述

Signature类提供数字签名功能,支持初始化签名、验证签名、更新数据等操作

在文件 Signature.x4 行定义.

成员函数说明

◆ finalize()

void finalize ( )

◆ getAlgorithm()

String getAlgorithm ( )

◆ getInstance()

static final Signature getInstance ( String  ) throws IllegalArgumentException
static

◆ getParameter()

Object getParameter ( String  ) throws IllegalArgumentException

◆ initSign() [1/2]

void initSign ( Key  ) throws IllegalArgumentException

使用指定密钥初始化签名操作

参数
key用于签名的私钥
异常
IllegalArgumentException如果参数无效

◆ initSign() [2/2]

void initSign ( Key  ,
  Object 
)

使用指定密钥和随机源初始化签名操作

参数
key用于签名的私钥
param随机源或其他参数

◆ initVerify()

void initVerify ( Key  ) throws IllegalArgumentException

初始化验证操作

参数
key用于验证的公钥
异常
IllegalArgumentException如果参数无效

◆ newInstance()

Signature newInstance ( String  )

创建一个新的Signature实例

参数
algorithm算法名称
返回
新创建的Signature实例

◆ registrySignature()

static final bool registrySignature ( String  ,
  Signature 
)
static

◆ setParameter()

void setParameter ( String  ,
  Object 
) throws IllegalArgumentException

◆ sign() [1/2]

byte [] sign ( ) throws IllegalArgumentException

生成签名

返回
签名数据的字节数组
异常
IllegalArgumentException如果操作未正确初始化

◆ sign() [2/2]

int sign ( byte  [],
int  ,
int   
) throws IllegalArgumentException

◆ update()

void update ( byte  [],
int  ,
int   
) throws IllegalArgumentException

◆ verify()

bool verify ( byte  [],
int  ,
int   
) throws IllegalArgumentException

结构体成员变量说明

◆ SIGN

const int SIGN
static

在文件 Signature.x7 行定义.

◆ UNINITIALIZED

const int UNINITIALIZED
static

在文件 Signature.x8 行定义.

◆ VERIFY

const int VERIFY
static

在文件 Signature.x9 行定义.