public Base64SharedPreferences(Context context,String preferenceName,String secureKey,boolean encryptKeys) throws SecurePreferencesException {
  try {
    this.writer=Cipher.getInstance(TRANSFORMATION);
    this.reader=Cipher.getInstance(TRANSFORMATION);
    this.keyWriter=Cipher.getInstance(KEY_TRANSFORMATION);
    initCiphers(secureKey);
    this.preferences=context.getSharedPreferences(preferenceName,Context.MODE_PRIVATE);
    this.encryptKeys=encryptKeys;
  }
 catch (  GeneralSecurityException e) {
    throw new SecurePreferencesException(e);
  }
catch (  UnsupportedEncodingException e) {
    throw new SecurePreferencesException(e);
  }
}

public Base64SharedPreferences ( Context context , String preferenceName , String secureKey , boolean encryptKeys ) throws SecurePreferencesException { try { this . writer = Cipher . getInstance ( TRANSFORMATION ) ; this . reader = Cipher . getInstance ( TRANSFORMATION ) ; this . keyWriter = Cipher . getInstance ( KEY_TRANSFORMATION ) ; initCiphers ( secureKey ) ; this . preferences = context . getSharedPreferences ( preferenceName , Context . MODE_PRIVATE ) ; this . encryptKeys = encryptKeys ; } catch ( GeneralSecurityException e ) { throw new SecurePreferencesException ( e ) ; } catch ( UnsupportedEncodingException e ) { throw new SecurePreferencesException ( e ) ; } }
this will initialize an instance of the securepreferences class
