@salesforce/core
    Preparing search index...

    Class Crypto

    Class for managing encrypting and decrypting private auth information.

    Hierarchy

    • AsyncOptionalCreatable<CryptoOptions>
      • Crypto
    Index
    • Clears the crypto state. This should be called in a finally block.

      Returns void

    • Decrypts text.

      Parameters

      • text: string

        The text to decrypt.

      Returns string

    • Encrypts text. Returns the encrypted string or undefined if no string was passed.

      Parameters

      • text: string

        The text to encrypt.

      Returns string

    • Takes a best guess if the value provided was encrypted by Crypto.encrypt by checking the delimiter, tag length, and valid characters.

      Parameters

      • Optionaltext: string

        The text

      Returns boolean

      true if the text is encrypted, false otherwise.