encrypt

open override fun encrypt(text: String): String(source)

Encrypts the given text using the implementation-specific algorithm. Implementations should ensure:

  • Consistent encryption results for the same input

  • Safe handling of special characters

  • Proper error handling for invalid inputs

Return

Encrypted text in a format suitable for storage

Parameters

text

Plain text to encrypt (must not be empty)

Throws

if text is empty