@confluentinc/schemaregistry
Version:
Node.js client for Confluent Schema Registry
34 lines (33 loc) • 995 B
TypeScript
/**
* Copyright 2020 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
/**
* Validates AES key sizes, at the moment only 128-bit and 256-bit keys are
* supported.
*
* @param n - the key size in bytes
* @throws {@link InvalidArgumentsException}
*/
export declare function validateAesKeySize(n: number): void;
/**
* Validates that the input is a non null Uint8Array.
*
* @throws {@link InvalidArgumentsException}
*/
export declare function requireUint8Array(input: Uint8Array<ArrayBuffer>): void;
/**
* Validates version, throws exception if candidate version is negative or
* bigger than expected.
*
* @param candidate - version to be validated
* @param maxVersion - upper bound on version
* @throws {@link SecurityException}
*/
export declare function validateVersion(candidate: number, maxVersion: number): void;
/**
* Validates ECDSA parameters.
*
* @throws {@link SecurityException}
*/
export declare function validateEcdsaParams(curve: string, hash: string): void;