declare module 'crypto-js' {
  export interface WordArray {
    toString(encoder?: any): string
  }

  export interface AES {
    encrypt(message: string, key: string): CipherParams
    decrypt(ciphertext: string | CipherParams, key: string): WordArray
  }

  export interface CipherParams {
    ciphertext: WordArray
    key?: WordArray
    iv?: WordArray
    salt?: WordArray
    algorithm?: string
    mode?: any
    padding?: any
    blockSize?: number
    formatter?: any
    toString(format?: any): string
  }

  export const AES: AES
  export const enc: {
    Utf8: any
    Base64: any
    Hex: any
  }

  const CryptoJS: {
    AES: AES
    enc: typeof enc
  }

  export default CryptoJS
}
