encryptData

fun encryptData(sharedPref: SharedPreferences, encryptPassword: String?, data: ByteArray): ByteArray

This method will encrypt the given data

Return

Encrypted data in a byte array

Parameters

sharedPref

: the sharedPref, to fetch the key

data

: the data that will be encrypted