Interface: ZkPassUtility

Defines functions for digital signature and encryption

Implemented by

Table of contents

Methods

Methods

decryptJweToken

▸ decryptJweToken(key, jweToken): Promise<JWTDecryptResult>

Decrypts a JWT token

Parameters

Returns

Promise<JWTDecryptResult>


encryptDataToJweToken

▸ encryptDataToJweToken(key, data): Promise<string>

Encrypts data into a JWE token

Parameters

Returns

Promise<string>


signDataToJwsToken

▸ signDataToJwsToken(signingKey, data, verifyingKeyJwks?): Promise<string>

Signs data into a JWS token

Parameters

Returns

Promise<string>


verifyJwsToken

▸ verifyJwsToken(key, jwsToken): Promise<JWTVerifyResult>

Verifies the signature of a JWS token

Parameters

Returns

Promise<JWTVerifyResult>


getEncryptionKey

▸ getEncryptionKey(): Promise<string>

Asynchronously retrieves the service encryption public key from the getKeys function

Returns

Promise<string>


getVerifyingKey

▸ getVerifyingKey(): Promise<string>

Asynchronously retrieves the service verifying public key from the getKeys function

Returns

Promise<string>

Last updated