class SigningCredentials
cangjie
public class SigningCredentials功能:表示令牌签名所需的密钥与算法组合。
成员概览
| 成员 | 功能 |
|---|---|
| init(SecurityKey, String) | 使用密钥和算法创建签名凭据。 |
| prop key | 获取签名使用的安全密钥。 |
| prop algorithm | 获取签名算法标识。 |
| func createSignatureProvider() | 创建签名用的签名提供者。 |
init(SecurityKey, String)
cangjie
public init(key: SecurityKey, algorithm: String)功能:使用密钥和算法创建签名凭据。
参数:
- key: SecurityKey - 用于签名的安全密钥。
- algorithm:
String- 签名算法标识。
prop key
cangjie
public prop key: SecurityKey功能:获取签名使用的安全密钥。
类型:SecurityKey
prop algorithm
cangjie
public prop algorithm: String功能:获取签名算法标识。
类型:String
func createSignatureProvider()
cangjie
public func createSignatureProvider(): SignatureProvider功能:创建签名用的签名提供者。
提供者由关联密钥上的 cryptoProviderFactory 创建,用完后应交还给工厂。
返回值:
- SignatureProvider - 用于当前签名凭据的签名提供者。