import { AnyUint8Array } from "../../types.js";
import { Jwk } from "../../modules/kms/jwk/jwk.js";

//#region src/crypto/webcrypto/types.d.ts

type HashAlgorithmIdentifier = 'SHA-256' | 'SHA-384' | 'SHA-512';
type EcdsaParams = {
  name: 'ECDSA';
  hash: {
    name: HashAlgorithmIdentifier;
  } | HashAlgorithmIdentifier;
};
type Ed25519Params = {
  name: 'Ed25519';
};
type RsaSsaParams = {
  name: 'RSASSA-PKCS1-v1_5' | 'RSA-PSS';
  hash: {
    name: HashAlgorithmIdentifier;
  } | HashAlgorithmIdentifier;
  saltLength?: number;
};
type Ed25519KeyGenParams = {
  name: 'Ed25519';
};
type EcKeyGenParams = {
  name: 'ECDSA';
  namedCurve: 'P-256' | 'P-384' | 'P-521' | 'K-256';
};
type RsaHashedKeyGenParams = {
  name: 'RSASSA-PKCS1-v1_5' | 'RSA-PSS';
  modulusLength: number;
  publicExponent: AnyUint8Array;
  hash: {
    name: HashAlgorithmIdentifier;
  };
};
type Ed25519KeyImportParams = {
  name: 'Ed25519';
};
type EcKeyImportParams = {
  name: 'ECDSA';
  namedCurve: 'P-256' | 'P-384' | 'K-256' | 'P-521';
};
type RsaHashedImportParams = {
  name: 'RSASSA-PKCS1-v1_5' | 'RSA-PSS';
  hash: {
    name: HashAlgorithmIdentifier;
  };
};
type KeyUsage = 'sign' | 'verify' | 'encrypt' | 'decrypt' | 'wrapKey' | 'unwrapKey' | 'deriveKey' | 'deriveBits';
type KeyFormat = 'jwk' | 'pkcs8' | 'spki' | 'raw';
type KeyType = 'private' | 'public' | 'secret';
type JsonWebKey = Jwk;
type KeyImportParams = EcKeyImportParams | Ed25519KeyImportParams | RsaHashedImportParams;
type KeyGenAlgorithm = EcKeyGenParams | Ed25519KeyGenParams | RsaHashedKeyGenParams;
type KeySignParams = EcdsaParams | Ed25519Params | RsaSsaParams;
type KeyVerifyParams = EcdsaParams | Ed25519Params | RsaSsaParams;
//#endregion
export { JsonWebKey, KeyFormat, KeyGenAlgorithm, KeyImportParams, KeySignParams, KeyType, KeyUsage, KeyVerifyParams };
//# sourceMappingURL=types.d.ts.map