-
Notifications
You must be signed in to change notification settings - Fork 3
PLibCrypt
Victor Bieszka edited this page Mar 18, 2019
·
1 revision
public class PLibCrypt
extends java.lang.Object
Class for encryption and anonymization methods.
Constructor and Description |
---|
PLibCrypt() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
anonymizeObject(java.lang.Object source)
Anonymizes a source.
|
static java.lang.String |
byteArrayToHexString(byte[] array) |
static byte[] |
decrypt(android.content.Context context,
byte[] data) |
static AndroidId |
decryptAndroidId(android.content.Context context,AndroidId id) |
static java.math.BigInteger |
decryptBigInteger(android.content.Context context,java.math.BigInteger big) |
static IpV4Adr |
decryptIp(android.content.Context context,
IpV4Adr adr) |
static MacAdr |
decryptMacAdr(android.content.Context context,MacAdr mac) |
static Numbers |
decryptNumberString(android.content.Context context,Numbers numbers) |
static javax.crypto.CipherOutputStream |
decryptStream(android.content.Context context,
java.io.FileOutputStream fout)
Adapts a
FileOutputStream into a secured CipherOutputStream for
decryption. |
static java.lang.String |
decryptString(android.content.Context context,
java.lang.String base64EncodedEncryptedString) |
static java.lang.String |
decryptString(android.content.Context context,
java.lang.String input,
java.lang.String password) |
static AndroidId |
encryptAndroidId(android.content.Context context,AndroidId id) |
static java.math.BigInteger |
encryptBigInteger(android.content.Context context,
java.math.BigInteger big) |
static java.lang.String |
encryptBytes(android.content.Context context,
byte[] input,
java.lang.String password) |
static IpV4Adr |
encryptIp(android.content.Context context,
IpV4Adr adr) |
static MacAdr |
encryptMacAdr(android.content.Context context,MacAdr mac) |
static Numbers |
encryptNumberString(android.content.Context context,Numbers numbers) |
static javax.crypto.CipherInputStream |
encryptStream(android.content.Context context,
java.io.FileInputStream fin)
Adapts a
FileInputStream into a secured CipherInputStream for
encryption. |
static java.lang.String |
encryptString(android.content.Context context,
java.lang.String inputString) |
static java.lang.String |
encryptString(android.content.Context context,
java.lang.String input,
java.lang.String password) |
static byte[] |
hexToBytes(java.lang.String str) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public PLibCrypt()
-
public static javax.crypto.CipherInputStream encryptStream(android.content.Context context, java.io.FileInputStream fin)
Adapts aFileInputStream
into a securedCipherInputStream
for encryption.THIS METHOD IS REGARDED AS A LEGAL SINK THROUGH THE PLIB!
- Parameters:
-
context
- -
fin
- theFileInputStream
- Returns:
- a secured
CipherInputStream
for regardedFileInputStream
for encryption.
-
public static java.lang.String encryptString(android.content.Context context, java.lang.String inputString)
-
public static IpV4Adr encryptIp(android.content.Context context, IpV4Adr adr)
-
public static MacAdr encryptMacAdr(android.content.Context context,MacAdr mac)
-
public static AndroidId encryptAndroidId(android.content.Context context, AndroidId id)
-
public static Numbers encryptNumberString(android.content.Context context, Numbers numbers)
-
public static java.math.BigInteger encryptBigInteger(android.content.Context context, java.math.BigInteger big)
-
public static byte[] decrypt(android.content.Context context, byte[] data)
-
public static Numbers decryptNumberString(android.content.Context context, Numbers numbers)
-
public static IpV4Adr decryptIp(android.content.Context context, IpV4Adr adr)
-
public static MacAdr decryptMacAdr(android.content.Context context, MacAdr mac)
-
public static AndroidId decryptAndroidId(android.content.Context context, AndroidId id)
-
public static java.math.BigInteger decryptBigInteger(android.content.Context context, java.math.BigInteger big)
-
public static java.lang.String decryptString(android.content.Context context, java.lang.String base64EncodedEncryptedString)
-
public static javax.crypto.CipherOutputStream decryptStream(android.content.Context context, java.io.FileOutputStream fout)
Adapts aFileOutputStream
into a securedCipherOutputStream
for decryption.- Parameters:
-
context
- -
fout
- theFileOutputStream
- Returns:
- a secured
CipherOutputStream
for regardedFileOutputStream
for decryption.
-
public static java.lang.String anonymizeObject(java.lang.Object source)
Anonymizes a source.- Parameters:
-
source
- data to anonymize - Returns:
- the anonymized string represantation of a source
-
public static java.lang.String encryptString(android.content.Context context, java.lang.String input, java.lang.String password)
-
public static java.lang.String encryptBytes(android.content.Context context, byte[] input, java.lang.String password)
-
public static java.lang.String byteArrayToHexString(byte[] array)
-
public static java.lang.String decryptString(android.content.Context context, java.lang.String input, java.lang.String password)
-
public static byte[] hexToBytes(java.lang.String str)