Skip to content

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 创建,用完后应交还给工厂。

返回值: