Hierarchy

  • Aes

Properties

encryptGCMAsync: ((params: { plainText: string; key: string; ivSize: number; onComplete: ((encryptedText: string, iv: string) => void); onFailure: ((err: string) => void) }) => void)

Type declaration

    • (params: { plainText: string; key: string; ivSize: number; onComplete: ((encryptedText: string, iv: string) => void); onFailure: ((err: string) => void) }): void
    • Used to encrypt the provided plain text with given parameters.

      Method

      encryptGCMAsync

      Ios

      Android

      Since

      4.4

      Parameters

      • params: { plainText: string; key: string; ivSize: number; onComplete: ((encryptedText: string, iv: string) => void); onFailure: ((err: string) => void) }
        • plainText: string

          Content to encrypt.

        • key: string

          Secret AES key which is encoded with Bas64.

        • ivSize: number
        • onComplete: ((encryptedText: string, iv: string) => void)
            • (encryptedText: string, iv: string): void
            • This event called when content encrypted successfully.

              Parameters

              • encryptedText: string
              • iv: string

              Returns void

        • onFailure: ((err: string) => void)
            • (err: string): void
            • This event called when an exception occured while encrypting content.

              Parameters

              • err: string

              Returns void

      Returns void

decryptGCMAsync: ((params: { encryptedText: string; key: string; iv: string; onComplete: ((decryptedText: string) => void); onFailure: ((err: string) => void) }) => void)

Type declaration

    • (params: { encryptedText: string; key: string; iv: string; onComplete: ((decryptedText: string) => void); onFailure: ((err: string) => void) }): void
    • Used to decrypt the provided encrypted text with given parameters.

      Method

      decryptGCMAsync

      Ios

      Android

      Since

      4.4

      Parameters

      • params: { encryptedText: string; key: string; iv: string; onComplete: ((decryptedText: string) => void); onFailure: ((err: string) => void) }
        • encryptedText: string

          The content to decrypt which is in Base64.

        • key: string

          Secret AES key which is encoded with Bas64.

        • iv: string

          The IV in Base64.

        • onComplete: ((decryptedText: string) => void)
            • (decryptedText: string): void
            • This event called when content decrypted successfully.

              Parameters

              • decryptedText: string

              Returns void

        • onFailure: ((err: string) => void)
            • (err: string): void
            • This event called when an exception occured while encrypting content.

              Parameters

              • err: string

              Returns void

      Returns void

generateKey: ((length: number) => string)

Type declaration

    • (length: number): string
    • Used to generate secure random key with given size. Key could be one of 16, 24, or 32 bytes

      Method

      generateKey

      Ios

      Android

      Since

      4.4

      Parameters

      • length: number

      Returns string

Constructors

  • Returns Aes

Generated using TypeDoc