ICrypto interface

函式庫使用的加密函式介面

方法

base64Decode(string)

base64 解碼字串

base64Encode(string)

base64 編碼字串

base64UrlEncode(string)

base64 URL 安全編碼字串

clearKeystore()

移除所有 IndexedDB 儲存中的密碼金鑰

createNewGuid()

隨機建立一個指引。

encodeKid(string)

串化並編碼 base64Url 輸入公鑰

getPublicKeyThumbprint(SignedHttpRequestParameters)

產生 JWK RSA S256 拇指指紋

hashString(string)

回傳輸入字串的 SHA-256 雜湊值

removeTokenBindingKey(string)

從與輸入的 keyId 相符的密鑰儲存中移除密碼學金鑰對

signJwt(SignedHttpRequest, string, ShrOptions, string)

回傳一份簽署的持有證明代幣,並附有包含包含 CNF 申請及所需子女的 accesses 代幣。

方法詳細資料

base64Decode(string)

base64 解碼字串

function base64Decode(input: string): string

參數

input

string

傳回

string

base64Encode(string)

base64 編碼字串

function base64Encode(input: string): string

參數

input

string

傳回

string

base64UrlEncode(string)

base64 URL 安全編碼字串

function base64UrlEncode(input: string): string

參數

input

string

傳回

string

clearKeystore()

移除所有 IndexedDB 儲存中的密碼金鑰

function clearKeystore(): Promise<boolean>

傳回

Promise<boolean>

createNewGuid()

隨機建立一個指引。

function createNewGuid(): string

傳回

string

encodeKid(string)

串化並編碼 base64Url 輸入公鑰

function encodeKid(inputKid: string): string

參數

inputKid

string

傳回

string

Base64Url 編碼公鑰

getPublicKeyThumbprint(SignedHttpRequestParameters)

產生 JWK RSA S256 拇指指紋

function getPublicKeyThumbprint(request: SignedHttpRequestParameters): Promise<string>

參數

傳回

Promise<string>

hashString(string)

回傳輸入字串的 SHA-256 雜湊值

function hashString(plainText: string): Promise<string>

參數

plainText

string

傳回

Promise<string>

removeTokenBindingKey(string)

從與輸入的 keyId 相符的密鑰儲存中移除密碼學金鑰對

function removeTokenBindingKey(kid: string): Promise<void>

參數

kid

string

傳回

Promise<void>

signJwt(SignedHttpRequest, string, ShrOptions, string)

回傳一份簽署的持有證明代幣,並附有包含包含 CNF 申請及所需子女的 accesses 代幣。

function signJwt(payload: SignedHttpRequest, kid: string, shrOptions?: ShrOptions, correlationId?: string): Promise<string>

參數

kid

string

shrOptions
ShrOptions
correlationId

string

傳回

Promise<string>