#050 BC SECRET TEXT DATA TYPE
A new data type, SecretText, was created to protect credentials and other confidential text values from being revealed through debugging. The syntax of the declaration is like the Text data type, with one distinction: there are no limitations on length.
SecretText can be usable as a:
- Variable value
- Return value
- Parameter value
The following methods are available on the SecretText data type:
- SecretStrSubstNo(Text [, SecretText,…])
Replaces %1, %2, %3… and #1, #2, #3… fields in a string with the values you provide as optional parameters.
The following methods are available on instances of the SecretText data type:
- IsEmpty()
Returns a value indicating whether the secret text contains any content.
- Unwrap()
Returns the text contained text inside the secret text as a plain text value. This method exists for compatibility reasons and its use is discouraged as it can lead to secret exposure.
In the following example, the return value and parameter will not be debuggable.
When debugging, it will be displayed as “<HiddenValue>”.