struct KeyIdentifier
cangjie
public struct KeyIdentifier <: Equatable<KeyIdentifier> & ToString & Hashable功能:表示数据保护密钥标识。
父类型:
- Equatable<KeyIdentifier>
ToStringHashable
成员概览
| 成员 | 功能 |
|---|---|
| init(Array<Byte>) | 使用指定字节创建密钥标识。 |
| func ==(KeyIdentifier) | 判断两个密钥标识是否相等。 |
| func toBytes() | 返回密钥标识的字节副本。 |
| func create() | 创建新的随机密钥标识。 |
| func toString() | 返回密钥标识的十六进制字符串表示。 |
| func hashCode() | 返回密钥标识的哈希码。 |
init(Array<Byte>)
cangjie
public init(bytes: Array<Byte>)功能:使用指定字节创建密钥标识。
参数:
- bytes:
Array<Byte>- 密钥标识字节数组。
func ==(KeyIdentifier)
cangjie
public operator func ==(that: KeyIdentifier): Bool功能:判断两个密钥标识是否相等。
参数:
- that: KeyIdentifier - 需要比较的另一个密钥标识。
返回值:
Bool- 如果两个密钥标识相等则返回true。
func toBytes()
cangjie
public func toBytes(): Array<Byte>功能:返回密钥标识的字节副本。
返回值:
Array<Byte>- 返回密钥标识字节数组。
func create()
cangjie
public static func create(): KeyIdentifier功能:创建新的随机密钥标识。
返回值:
- KeyIdentifier - 返回新生成的密钥标识。
func toString()
cangjie
public func toString(): String功能:返回密钥标识的十六进制字符串表示。
返回值:
String- 返回密钥标识字符串。
func hashCode()
cangjie
public func hashCode(): Int64功能:返回密钥标识的哈希码。
返回值:
Int64- 返回密钥标识哈希值。