SalesforceKeyGenerator

This class provides methods to generate a unique ID that can be used as an encryption key. The key is derived from an AES-256 base using SecureRandom or AES-128 base using UUID.

Author

bhariharan

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open fun clearAll()
Clears all stored identifiers from shared preferences.
Link copied to clipboard
open fun getEncryptionKey(name: String): String
Returns the encryption key being used.
Link copied to clipboard
Returns a randomly generated 128-byte key that's URL safe.
Link copied to clipboard
open fun getSHA256Hash(privateKey: String): String
Returns the SHA-256 hashed value of the supplied private key.
Link copied to clipboard
open fun getUniqueId(name: String): String
Returns the unique ID being used.
open fun getUniqueId(name: String, length: Int): String
Returns the unique ID being used based on the key length.