decryptForThisServer | WebHare Platform SDK
WebHare Platform SDK
    Preparing search index...

    Function decryptForThisServer

    • Decrypt data encrypted using encryptForThisServer

      Type Parameters

      • S extends string

      Parameters

      • scope: (keyof ServerEncryptionScopes) | S

        Scope for encryption (must be unique for each Encrypt usage so you can't accidentally mix up calls)

      • text: string

        Data to decrypt

      • options: { nullIfInvalid: true }

        Options for decryption

        • nullIfInvalid: true

          If true, return null if the data is invalid (instead of throwing an error)

      Returns
          | null
          | (
              S extends keyof ServerEncryptionScopes
                  ? ServerEncryptionScopes[S<S>]
                  : unknown
          )

    • Decrypt data encrypted using encryptForThisServer

      Type Parameters

      • S extends string

      Parameters

      • scope: (keyof ServerEncryptionScopes) | S

        Scope for encryption (must be unique for each Encrypt usage so you can't accidentally mix up calls)

      • text: string

        Data to decrypt

      • Optionaloptions: { nullIfInvalid?: boolean }

        Options for decryption

        • OptionalnullIfInvalid?: boolean

          If true, return null if the data is invalid (instead of throwing an error)

      Returns S extends keyof ServerEncryptionScopes ? ServerEncryptionScopes[S<S>] : unknown