export type Encrypted = {
  iv: string;
  content: string;
  authTag: string;
};

export interface IEncryption {
  encrypt(text: string): Promise<Encrypted>;
  decrypt(encrypted: Encrypted): Promise<string>;
}

export type ReEncryptData = (prevEncrypted: Encrypted) => Promise<Encrypted>;
export type CreateRotator = (
  oldSecretKey: string,
  newSecretKey: string
) => ReEncryptData;
