Namespace: operation
cryptography.operation
Functions
decrypt
▸ decrypt(jwe
, recipientKeyId
, privateKey
, options
): Promise
<string
>
Parameters
Name | Type |
---|---|
jwe | JWEDocument |
recipientKeyId | string |
privateKey | Buffer |
options | CreateResolverParam |
Returns
Promise
<string
>
Defined in
packages/klayr-decentralized-identifier/src/cryptography/operation.ts:26
encrypt
▸ encrypt(data
, recipientKeyId
, options
): Promise
<JWEDocument
>
Parameters
Name | Type |
---|---|
data | string |
recipientKeyId | string [] |
options | CreateResolverParam |
Returns
Promise
<JWEDocument
>
Defined in
packages/klayr-decentralized-identifier/src/cryptography/operation.ts:11
sign
▸ sign(data
, did
, privateKey
, options
): Promise
<Buffer
>
Parameters
Name | Type |
---|---|
data | string |
did | string |
privateKey | Buffer |
options | CreateResolverParam |
Returns
Promise
<Buffer
>
Defined in
packages/klayr-decentralized-identifier/src/cryptography/operation.ts:45
signLocal
▸ signLocal(data
, privateKey
): Promise
<Buffer
>
Parameters
Name | Type |
---|---|
data | string |
privateKey | Buffer |
Returns
Promise
<Buffer
>
Defined in
packages/klayr-decentralized-identifier/src/cryptography/operation.ts:93
verify
▸ verify(data
, did
, signature
, publicKey
, options
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
data | string |
did | string |
signature | Buffer |
publicKey | Buffer |
options | CreateResolverParam & { 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
Name | Type | Default value |
---|---|---|
data | string | undefined |
signature | Buffer | undefined |
publicKey | Buffer | undefined |
withDigest | boolean | false |
Returns
Promise
<boolean
>
Defined in
packages/klayr-decentralized-identifier/src/cryptography/operation.ts:99