@sovereignbase/cryptosuite
    Preparing search index...

    Class CipherCluster

    Routes cipher operations through cached key harness instances.

    Index
    • Decrypts a cipher message with the provided cipher key.

      Parameters

      • cipherKey: CipherKey

        The symmetric cipher key to use.

        • JsonWebKey & {
              crv?: undefined;
              d?: undefined;
              dp?: undefined;
              dq?: undefined;
              e?: undefined;
              n?: undefined;
              oth?: undefined;
              p?: undefined;
              q?: undefined;
              qi?: undefined;
              x?: undefined;
              y?: undefined;
          } & {
              alg: "A256CTR";
              k: string;
              key_ops: readonly ("encrypt" | "decrypt")[];
              kty: "oct";
              use: "enc";
          }
        • JsonWebKey & {
              crv?: undefined;
              d?: undefined;
              dp?: undefined;
              dq?: undefined;
              e?: undefined;
              n?: undefined;
              oth?: undefined;
              p?: undefined;
              q?: undefined;
              qi?: undefined;
              x?: undefined;
              y?: undefined;
          } & {
              alg: "A256GCM";
              k: string;
              key_ops: readonly ("encrypt" | "decrypt")[];
              kty: "oct";
              use: "enc";
          }
      • cipherMessage: CipherMessage

        The cipher message artifact to decrypt.

      Returns Promise<Uint8Array<ArrayBufferLike>>

      The decrypted plaintext bytes.

    • Encrypts message bytes with the provided cipher key.

      Parameters

      • cipherKey: CipherKey

        The symmetric cipher key to use.

        • JsonWebKey & {
              crv?: undefined;
              d?: undefined;
              dp?: undefined;
              dq?: undefined;
              e?: undefined;
              n?: undefined;
              oth?: undefined;
              p?: undefined;
              q?: undefined;
              qi?: undefined;
              x?: undefined;
              y?: undefined;
          } & {
              alg: "A256CTR";
              k: string;
              key_ops: readonly ("encrypt" | "decrypt")[];
              kty: "oct";
              use: "enc";
          }
        • JsonWebKey & {
              crv?: undefined;
              d?: undefined;
              dp?: undefined;
              dq?: undefined;
              e?: undefined;
              n?: undefined;
              oth?: undefined;
              p?: undefined;
              q?: undefined;
              qi?: undefined;
              x?: undefined;
              y?: undefined;
          } & {
              alg: "A256GCM";
              k: string;
              key_ops: readonly ("encrypt" | "decrypt")[];
              kty: "oct";
              use: "enc";
          }
      • messageBytes: Uint8Array

        The plaintext bytes to encrypt.

      Returns Promise<CipherMessage>

      The cipher message artifact.