xlang v4.0 Release
程序设计语言基础库文档
载入中...
搜索中...
未找到
静态 Public 成员函数 | 静态包函数 | 静态包属性
Crypto类 参考

密码处理类 更多...

静态 Public 成员函数

静态包函数

静态包属性

详细描述

密码处理类

在文件 BuiltinObjects.x1074 行定义.

成员函数说明

◆ aes_close()

static final void aes_close ( long  ) throws IllegalArgumentException
static

◆ aes_encrypt()

static final int aes_encrypt ( long  ,
  byte[],
int  ,
int  ,
  byte[],
int  ,
int  ,
int   
) throws IndexOutOfBoundsException, IllegalArgumentException
static

◆ aes_open()

static final long aes_open ( String  ,
  String,
int  ,
bool   
) throws IllegalArgumentException
static

◆ md5_close()

static final void md5_close ( long  )
static

◆ md5_final()

static final void md5_final ( long  )
static

◆ md5_init()

static final long md5_init ( )
static

◆ md5_result()

static final byte [] md5_result ( long  )
static

◆ md5_update()

static final void md5_update ( long  ,
  byte[],
int  ,
int   
) throws IndexOutOfBoundsException
static

◆ MD5Close()

static void MD5Close ( long  hmd5)
staticpackage

关闭MD5对象句柄

参数
hmd5使用Md5Init创建的MD5对象句柄

◆ MD5Final()

static void MD5Final ( long  hmd5)
staticpackage

MD5更新结束

参数
hmd5使用Md5Init创建的MD5对象句柄

◆ MD5Get()

static byte [] MD5Get ( long  hmd5)
staticpackage

获取MD5结果

参数
hmd5使用Md5Init创建的MD5对象句柄

◆ Md5Init()

static long Md5Init ( )
staticpackage

创建 一个MD5加密的对象句柄

◆ Md5Update()

static void Md5Update ( long  hmd5,
byte []  buffer,
int  pos,
int  length 
)
staticpackage

更新MD5内容

参数
hmd5使用Md5Init创建的MD5对象句柄
buffer缓冲区
pos位置
length长度
异常
IndexOutOfBoundsexception
NullPointerexception

◆ RSA1Init()

static long RSA1Init ( )
staticpackage

创建 一个RSA加密的对象句柄

◆ rsa_close()

static final void rsa_close ( long  ) throws IllegalArgumentException
static

◆ rsa_create()

static final bool rsa_create ( long  ,
int   
) throws IllegalArgumentException
static

◆ rsa_decryptoMaxSize()

static final int rsa_decryptoMaxSize ( long  ) throws IllegalArgumentException
static

◆ rsa_encryptoMaxSize()

static final int rsa_encryptoMaxSize ( long  ) throws IllegalArgumentException
static

◆ rsa_getPrivateKey()

static final byte [] rsa_getPrivateKey ( long  ) throws IllegalArgumentException
static

◆ rsa_getPublicKey()

static final byte [] rsa_getPublicKey ( long  ) throws IllegalArgumentException
static

◆ rsa_init()

static final long rsa_init ( )
static

◆ rsa_loadFromPrivateKey()

static final bool rsa_loadFromPrivateKey ( long  ,
  byte[],
int  ,
int   
) throws IndexOutOfBoundsException, IllegalArgumentException
static

◆ rsa_loadFromPublicKey()

static final bool rsa_loadFromPublicKey ( long  ,
  byte[],
int  ,
int   
) throws IndexOutOfBoundsException, IllegalArgumentException
static

◆ rsa_privateDecrypto()

static final byte [] rsa_privateDecrypto ( long  ,
  byte[],
int  ,
int  ,
int   
) throws IndexOutOfBoundsException, IllegalArgumentException
static

◆ rsa_privateEncrypto()

static final byte [] rsa_privateEncrypto ( long  ,
  byte[],
int  ,
int  ,
int   
) throws IndexOutOfBoundsException, IllegalArgumentException
static

◆ rsa_publicDecrypto()

static final byte [] rsa_publicDecrypto ( long  ,
  byte[],
int  ,
int  ,
int   
) throws IndexOutOfBoundsException, IllegalArgumentException
static

◆ rsa_publicEncrypto()

static final byte [] rsa_publicEncrypto ( long  ,
  byte[],
int  ,
int  ,
int   
) throws IndexOutOfBoundsException, IllegalArgumentException
static

◆ RSAClose()

static void RSAClose ( long  hrsa)
staticpackage

关闭RSA对象

参数
hrsa使用RSA1Init创建的RSA对象句柄

◆ RSACreate()

static bool RSACreate ( long  hrsa,
int  length 
)
staticpackage

产生一个模为length位的密钥对 创建RSA对象

参数
hrsa使用RSA1Init创建的RSA对象句柄
length长度
异常
IllegalArgumentexception

◆ RSADecryptoMaxSize()

static int RSADecryptoMaxSize ( long  hrsa)
staticpackage

获取可以解密的密文的最大数据长度

参数
hrsa使用RSA1Init创建的RSA对象句柄

◆ RSAEncryptoMaxSize()

static int RSAEncryptoMaxSize ( long  hrsa)
staticpackage

获取可以加密的密文的最大数据长度

参数
hrsa使用RSA1Init创建的RSA对象句柄

◆ RSAGetPrivateKey()

static byte [] RSAGetPrivateKey ( long  hrsa)
staticpackage

获取私钥

参数
hrsa使用RSA1Init创建的RSA对象句柄
异常
IllegalArgumentexception

◆ RSAGetPublicKey()

static byte [] RSAGetPublicKey ( long  hrsa)
staticpackage

获取公钥

参数
hrsa使用RSA1Init创建的RSA对象句柄
异常
IllegalArgumentexception

◆ RSALoadFromPrivateKey()

static bool RSALoadFromPrivateKey ( long  hrsa,
byte []  buffer,
int  pos,
int  length 
)
staticpackage

使用私钥初始化一个RSA对象

参数
hrsa使用RSA1Init创建的RSA对象句柄
buffer缓冲区
pos位置
length长度
异常
IndexOutOfBoundsexception
NullPointerexception

◆ RSALoadFromPublicKey()

static bool RSALoadFromPublicKey ( long  hrsa,
byte []  buffer,
int  pos,
int  length 
)
staticpackage

使用公钥初始化一个RSA对象

参数
hsha1使用RSA1Init创建的SHA1对象句柄
buffer缓冲区
pos位置
length长度
异常
IndexOutOfBoundsexception
NullPointerexception

◆ RSAPrivateEncrypto()

static byte [] RSAPrivateEncrypto ( long  hrsa,
byte []  buffer,
int  pos,
int  length,
int  padding 
)
staticpackage

使用私钥加密数据

参数
hrsa使用RSA1Init创建的RSA对象句柄
buffer缓冲区
pos位置
length长度
padding
参见
NoPadding ~ ZerosPadding
异常
IllegalArgumentexception
IndexOutOfBoundsexception
NullPointerexception

◆ RSAPublicDecrypto()

static byte [] RSAPublicDecrypto ( long  hrsa,
byte []  buffer,
int  pos,
int  length,
int  padding 
)
staticpackage

使用公钥解密数据

参数
hrsa使用RSA1Init创建的RSA对象句柄
buffer缓冲区
pos位置
length长度
padding
参见
NoPadding ~ ZerosPadding
异常
IllegalArgumentexception
IndexOutOfBoundsexception
NullPointerexception

◆ RSAPublicEncrypto() [1/2]

static byte [] RSAPublicEncrypto ( long  hrsa,
byte []  buffer,
int  pos,
int  length,
int  padding 
)
staticpackage

使用公钥加密数据

参数
hrsa使用RSA1Init创建的RSA对象句柄
buffer缓冲区
pos位置
length长度
padding
参见
NoPadding ~ ZerosPadding
异常
IllegalArgumentexception
IndexOutOfBoundsexception
NullPointerexception

◆ RSAPublicEncrypto() [2/2]

static byte [] RSAPublicEncrypto ( long  hrsa,
byte []  buffer,
int  pos,
int  length,
int  padding 
)
staticpackage

使用私钥解密数据

参数
hrsa使用RSA1Init创建的RSA对象句柄
buffer缓冲区
pos位置
length长度
padding
参见
NoPadding ~ ZerosPadding
异常
IllegalArgumentexception
IndexOutOfBoundsexception
NullPointerexception

◆ sha1_close()

static final void sha1_close ( long  )
static

◆ sha1_final()

static final void sha1_final ( long  )
static

◆ sha1_init()

static final long sha1_init ( )
static

◆ sha1_result()

static final byte [] sha1_result ( long  )
static

◆ sha1_update()

static final void sha1_update ( long  ,
  byte[],
int  ,
int   
) throws IndexOutOfBoundsException
static

◆ SHA1Close()

static void SHA1Close ( long  hsha1)
staticpackage

关闭SHA1对象句柄

参数
hsha1使用SHA1Init创建的SHA1对象句柄

◆ SHA1Final()

static void SHA1Final ( long  hsha1)
staticpackage

SHA1更新结束

参数
hsha1使用SHA1Init创建的SHA1对象句柄

◆ SHA1Get()

static byte [] SHA1Get ( long  hsha1)
staticpackage

获取SHA1结果

参数
hsha1使用SHA1Init创建的SHA1对象句柄

◆ SHA1Init()

static long SHA1Init ( )
staticpackage

创建 一个SHA1加密的对象句柄

◆ SHA1Update()

static void SHA1Update ( long  hsha1,
byte []  buffer,
int  pos,
int  length 
)
staticpackage

更新SHA1内容

参数
hsha1使用SHA1Init创建的SHA1对象句柄
buffer缓冲区
pos位置
length长度
异常
IndexOutOfBoundsexception
NullPointerexception

◆ sm3_close()

static final void sm3_close ( long  )
static

◆ sm3_final()

static final void sm3_final ( long  )
static

◆ sm3_init()

static final long sm3_init ( )
static

◆ sm3_result()

static final byte [] sm3_result ( long  )
static

◆ sm3_update()

static final void sm3_update ( long  ,
  byte[],
int  ,
int   
) throws IndexOutOfBoundsException
static

结构体成员变量说明

◆ AES_CBC

const int AES_CBC
staticpackage

在文件 BuiltinObjects.x1080 行定义.

◆ AES_CFB1

const int AES_CFB1
staticpackage

在文件 BuiltinObjects.x1081 行定义.

◆ AES_CFB128

const int AES_CFB128
staticpackage

在文件 BuiltinObjects.x1082 行定义.

◆ AES_CFB8

const int AES_CFB8
staticpackage

在文件 BuiltinObjects.x1083 行定义.

◆ AES_ECB

const int AES_ECB
staticpackage

在文件 BuiltinObjects.x1084 行定义.

◆ NoPadding

static const int NoPadding = 0
staticpackage

在文件 BuiltinObjects.x1075 行定义.

◆ PKCS1Padding

static const int PKCS1Padding = 1
staticpackage

在文件 BuiltinObjects.x1076 行定义.

◆ PKCS5Padding

static const int PKCS5Padding = 2
staticpackage

在文件 BuiltinObjects.x1077 行定义.

◆ SSLV23Padding

static const int SSLV23Padding = 3
staticpackage

在文件 BuiltinObjects.x1078 行定义.

◆ ZerosPadding

static const int ZerosPadding = 4
staticpackage

在文件 BuiltinObjects.x1079 行定义.