BaseCipher

abstract class BaseCipher

The BaseCipher class is useful to manage the different encryption algorithms

Author

Tecknobit N7ghtm4r3

Since

2.1.5

See also

Inheritors

Constructors

Link copied to clipboard
constructor(algorithm: BaseCipher.Algorithm)
Constructor to init a BaseCipher object
constructor(cipher: Cipher)
Constructor to init a BaseCipher object

Types

Link copied to clipboard
Algorithm list of available algorithms for encryption

Properties

Link copied to clipboard
protected open var algorithm: BaseCipher.Algorithm
algorithm used during the encryption and the decryption phases
Link copied to clipboard
protected val cipher: Cipher
cipher to manage the encryption and the decryption phases

Functions

Link copied to clipboard
open fun decodeBase64(source: String): Array<Byte>
Method to decode a Base64 source
Link copied to clipboard
open fun decrypt(content: Array<Byte>): Array<Byte>
Method to decrypt a content
Link copied to clipboard
open fun decryptBase64(content: String): String
Method to decrypt a Base64 content
Link copied to clipboard
open fun encodeBase64(source: Array<Byte>): String
open fun encodeBase64(source: String): String
Method to encode in Base64 a source
Link copied to clipboard
open fun <T> encrypt(content: T): Array<Byte>
Method to encrypt any content
Link copied to clipboard
open fun <T> encryptBase64(content: T): String
Method to encrypt and format in Base64 any content
Link copied to clipboard
Method to get algorithm instance No-any params required
Link copied to clipboard
open fun getCipher(): Cipher
Method to get cipher instance No-any params required
Link copied to clipboard
open fun setAlgorithm(algorithm: BaseCipher.Algorithm)
Method to set algorithm instance
Link copied to clipboard
open fun toString(): String
Returns a string representation of the object No-any params required