public KeyData getEncryptionKeyData() {
        KeyData encryptionData = null;

        String savedValue = this.prefs.getString(preferenceKey, null);
        if (savedValue != null) {
            JSONObject savedObject = null;
            try {
                savedObject = new JSONObject(savedValue);
                encryptionData = new KeyData(DPKEncryptionUtil.hexStringToByteArray(savedObject
                        .getString(KEY_DPK)), DPKEncryptionUtil.hexStringToByteArray
                        (savedObject.getString(KEY_SALT)), DPKEncryptionUtil
                        .hexStringToByteArray(savedObject.getString(KEY_IV)), savedObject.getInt
                        (KEY_ITERATIONS), savedObject.getString(KEY_VERSION));
            } catch (JSONException e) {
                LOGGER.log(Level.SEVERE, e.getLocalizedMessage(), e);
                return null;
            } catch (DecoderException e) {
                LOGGER.log(Level.SEVERE, e.getLocalizedMessage(), e);
                return null;
            }
        }
        return encryptionData;
    }
public KeyData getEncryptionKeyData ( ) { KeyData encryptionData = null ; String savedValue = this . prefs . getString ( preferenceKey , null ) ; if ( savedValue != null ) { JSONObject savedObject = null ; try { savedObject = new JSONObject ( savedValue ) ; encryptionData = new KeyData ( DPKEncryptionUtil . hexStringToByteArray ( savedObject . getString ( KEY_DPK ) ) , DPKEncryptionUtil . hexStringToByteArray ( savedObject . getString ( KEY_SALT ) ) , DPKEncryptionUtil . hexStringToByteArray ( savedObject . getString ( KEY_IV ) ) , savedObject . getInt ( KEY_ITERATIONS ) , savedObject . getString ( KEY_VERSION ) ) ; } catch ( JSONException e ) { LOGGER . log ( Level . SEVERE , e . getLocalizedMessage ( ) , e ) ; return null ; } catch ( DecoderException e ) { LOGGER . log ( Level . SEVERE , e . getLocalizedMessage ( ) , e ) ; return null ; } } return encryptionData ; }
A {@link KeyData} previously saved with this storage (or other storage created before
with the same identifier).

@return A {@link KeyData} saved before or null