Constructs a new instance of the Local Cryptography client for the given key.
Example usage:
import { LocalCryptographyClient } from "@azure/keyvault-keys";
const jsonWebKey: JsonWebKey = {
// ...
};
const client = new LocalCryptographyClient(jsonWebKey);
The JsonWebKey to use during cryptography operations.
A JSON Web Key, used for the local cryptography operations.
Encrypts the given plaintext with the specified cryptography algorithm
Example usage:
let client = new LocalCryptographyClient(jsonWebKey);
let result = await client.encrypt("RSA1_5", Buffer.from("My Message"));
The algorithm to use.
The text to encrypt.
Verify the signed block of data
Example usage:
let client = new LocalCryptographyClient(jsonWebKey, credentials);
let result = await client.verifyData("RS256", signedMessage, signature);
The algorithm to use to verify with.
The signed block of data to verify.
The signature to verify the block against.
Wraps the given key using the specified cryptography algorithm
Example usage:
let client = new LocalCryptographyClient(jsonWebKey);
let result = await client.wrapKey("RSA1_5", keyToWrap);
The encryption algorithm to use to wrap the given key.
The key to wrap.
Generated using TypeDoc
A client used to perform local cryptographic operations with JSON Web Keys.