Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class MagiskDetector(context: Context)
Link copied to clipboard
class RSAPrivateKey(val modulus: Int, val d: Int)
Link copied to clipboard
class RSAPublicKey(val modulus: Int, val exponent: Int)

Properties

Link copied to clipboard

You can use Context.isAppInstalled() and iterate through the list

Link copied to clipboard

Functions

Link copied to clipboard

For documentation refer above, as it works following exactly the same principle.

Link copied to clipboard

Atbash cipher is one of the oldest ciphers known. It is a substitution cipher which works by reversing the alphabet. For instance, "AZ" would become "ZA" and so on.

Link copied to clipboard
fun caesarDecrypt(text: String, shift: Int): String
Link copied to clipboard
fun caesarEncrypt(text: String, shift: Int): String

Caesar cipher is a more advanced substitution cipher than Atbash cipher. Caesar cipher shifts all the letters in the alphabet by a certain amount, and then substitutes the letters with the ones on positions i + s, where i is the index of the original letter, and s is the shift number. The shift number is found out by computing shift % alphabet.size, where shift is the desired shift by the user and alphabet.size is the number of letters in the alphabet.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Context.encryptedSharedPreferences(fileName: String = ENCRYPTED_PREFS_DEFAULT_NAME, masterKey: MasterKey = getMasterKeyDefaultAlias): SharedPreferences
Link copied to clipboard
fun Context.encryptFile(file: File, masterKey: MasterKey = getMasterKeyDefaultAlias, fileContent: ByteArray)
Link copied to clipboard
fun Context.encryptFileSafely(file: File, masterKey: MasterKey = getMasterKeyDefaultAlias, fileContent: ByteArray)
Link copied to clipboard
fun generateOneTimePassword(passwordLength: Int = 8, shuffleCharacters: Boolean = true, random: SecureRandom = SecureRandom(), exemptChars: List<Char> = emptyList()): String
fun generateOneTimePassword(chars: CharArray = ("abcdefghijklmnopqrstuvwxyz" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "0123456789!@%$%&^?|~'\"#+=" + "\\*/.,:;[]()-_<>").toCharArray(), passwordLength: Int = 8, shuffleCharacters: Boolean = true, random: SecureRandom = SecureRandom(), exemptChars: List<Char> = emptyList()): String
Link copied to clipboard

Generates two random keys from prime numbers within the range.

fun generateRandomKeys(primeRange: IntRange, minimumModulus: Int): Pair<RSAPublicKey, RSAPrivateKey>
Link copied to clipboard
fun Context.getEncryptedFile(file: File, masterKey: MasterKey = getMasterKeyDefaultAlias): EncryptedFile
Link copied to clipboard
fun Context.getMasterKeyBuilder(alias: String = MasterKey.DEFAULT_MASTER_KEY_ALIAS): MasterKey.Builder
Link copied to clipboard
fun Context.getShaSignature(packageName: String): String?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Custom roms have this tag

Link copied to clipboard
fun Context.masterKey(alias: String = MasterKey.DEFAULT_MASTER_KEY_ALIAS)
fun Context.masterKey(alias: String = MasterKey.DEFAULT_MASTER_KEY_ALIAS, builder: MasterKey.Builder.() -> MasterKey.Builder = { this })
Link copied to clipboard
fun Context.masterKeyCustomSpec(alias: String = MasterKey.DEFAULT_MASTER_KEY_ALIAS, keyGenParameterSpec: KeyGenParameterSpec)
Link copied to clipboard
@RequiresApi(value = 28)
fun Context.masterKeyStrongBox(alias: String = MasterKey.DEFAULT_MASTER_KEY_ALIAS)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun EncryptedFile.readText(charset: Charset = Charsets.UTF_8): String
Link copied to clipboard
fun rsaDecrypt(message: Long, privateKey: RSAPrivateKey): Long
fun rsaDecrypt(message: String, blockSize: Int, privateKey: RSAPrivateKey): String
Link copied to clipboard
fun rsaEncrypt(message: Int, publicKey: RSAPublicKey): Long

Encrypt a number. For this to work properly, the modulus has to be bigger than the number. The formula for encryption is c = m^e mod n, where e is the public key exponent and n is the modulus.

fun rsaEncrypt(message: String, publicKey: RSAPublicKey): Pair<String, Int>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun vigenereSecurelyEncrypt(text: String, keyLength: Int = 2): Pair<String, String>

Encrypts using randomly generated keys for every N characters of the input string. Outputs a pair where the first element is the encrypted output and the second element is the random key.

Link copied to clipboard

If the count is more than 2 then the app is modified