Skip to main content

Namespace: operation

cryptography.operation

Functions

decrypt

decrypt(jwe, recipientKeyId, privateKey, options): Promise<string>

Parameters

NameType
jweJWEDocument
recipientKeyIdstring
privateKeyBuffer
optionsCreateResolverParam

Returns

Promise<string>

Defined in

packages/klayr-decentralized-identifier/src/cryptography/operation.ts:26


encrypt

encrypt(data, recipientKeyId, options): Promise<JWEDocument>

Parameters

NameType
datastring
recipientKeyIdstring[]
optionsCreateResolverParam

Returns

Promise<JWEDocument>

Defined in

packages/klayr-decentralized-identifier/src/cryptography/operation.ts:11


sign

sign(data, did, privateKey, options): Promise<Buffer>

Parameters

NameType
datastring
didstring
privateKeyBuffer
optionsCreateResolverParam

Returns

Promise<Buffer>

Defined in

packages/klayr-decentralized-identifier/src/cryptography/operation.ts:45


signLocal

signLocal(data, privateKey): Promise<Buffer>

Parameters

NameType
datastring
privateKeyBuffer

Returns

Promise<Buffer>

Defined in

packages/klayr-decentralized-identifier/src/cryptography/operation.ts:93


verify

verify(data, did, signature, publicKey, options): Promise<boolean>

Parameters

NameType
datastring
didstring
signatureBuffer
publicKeyBuffer
optionsCreateResolverParam & { withDigest?: boolean }

Returns

Promise<boolean>

Defined in

packages/klayr-decentralized-identifier/src/cryptography/operation.ts:63


verifyLocal

verifyLocal(data, signature, publicKey, withDigest?): Promise<boolean>

Parameters

NameTypeDefault value
datastringundefined
signatureBufferundefined
publicKeyBufferundefined
withDigestbooleanfalse

Returns

Promise<boolean>

Defined in

packages/klayr-decentralized-identifier/src/cryptography/operation.ts:99