Skip to content

PLibCrypt

Victor Bieszka edited this page Mar 18, 2019 · 1 revision

Class PLibCrypt

public class PLibCrypt
extends java.lang.Object
Class for encryption and anonymization methods.

Constructor Summary

 
Constructor and Description
PLibCrypt() 

Method Summary

   
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) 

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PLibCrypt

public PLibCrypt()

Method Detail

  • encryptStream

    public static javax.crypto.CipherInputStream encryptStream(android.content.Context context,
                                                               java.io.FileInputStream fin)
    Adapts a FileInputStream into a secured CipherInputStream for encryption.

    THIS METHOD IS REGARDED AS A LEGAL SINK THROUGH THE PLIB!

    Parameters:
    context -
    fin - the FileInputStream
    Returns:
    a secured CipherInputStream for regarded FileInputStream for encryption.
  • encryptString

    public static java.lang.String encryptString(android.content.Context context,
                                                 java.lang.String inputString)
  • encryptIp

    public static IpV4Adr encryptIp(android.content.Context context,
                                    IpV4Adr adr)
  • encryptMacAdr

    public static MacAdr encryptMacAdr(android.content.Context context,MacAdr mac)
  • encryptAndroidId

    public static AndroidId encryptAndroidId(android.content.Context context,
    AndroidId id)
  • encryptNumberString

    public static Numbers encryptNumberString(android.content.Context context,
    Numbers numbers)
  • encryptBigInteger

    public static java.math.BigInteger encryptBigInteger(android.content.Context context,
                                                         java.math.BigInteger big)
  • decrypt

    public static byte[] decrypt(android.content.Context context,
                                 byte[] data)
  • decryptNumberString

    public static Numbers decryptNumberString(android.content.Context context,
    Numbers numbers)
  • decryptIp

    public static IpV4Adr decryptIp(android.content.Context context,
    IpV4Adr adr)
  • decryptMacAdr

    public static MacAdr decryptMacAdr(android.content.Context context,
    MacAdr mac)
  • decryptAndroidId

    public static AndroidId decryptAndroidId(android.content.Context context,
    AndroidId id)
  • decryptBigInteger

    public static java.math.BigInteger decryptBigInteger(android.content.Context context,
                                                         java.math.BigInteger big)
  • decryptString

    public static java.lang.String decryptString(android.content.Context context,
                                                 java.lang.String base64EncodedEncryptedString)
  • decryptStream

    public static javax.crypto.CipherOutputStream decryptStream(android.content.Context context,
                                                                java.io.FileOutputStream fout)
    Adapts a FileOutputStream into a secured CipherOutputStream for decryption.
    Parameters:
    context -
    fout - the FileOutputStream
    Returns:
    a secured CipherOutputStream for regarded FileOutputStream for decryption.
  • anonymizeObject

    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
  • encryptString

    public static java.lang.String encryptString(android.content.Context context,
                                                 java.lang.String input,
                                                 java.lang.String password)
  • encryptBytes

    public static java.lang.String encryptBytes(android.content.Context context,
                                                byte[] input,
                                                java.lang.String password)
  • byteArrayToHexString

    public static java.lang.String byteArrayToHexString(byte[] array)
  • decryptString

    public static java.lang.String decryptString(android.content.Context context,
                                                 java.lang.String input,
                                                 java.lang.String password)
  • hexToBytes

    public static byte[] hexToBytes(java.lang.String str)