Here you can find the source of getSaltFromPreferences(SharedPreferences prefs)
private static byte[] getSaltFromPreferences(SharedPreferences prefs)
//package com.java2s; import android.content.SharedPreferences; import android.util.Base64; public class Main { private static final String KEY_PR_SALT = "com.venmo.pin.pr_salt"; private static byte[] getSaltFromPreferences(SharedPreferences prefs) { return decode(getStringFromPrefsOrThow(prefs, KEY_PR_SALT)); }/*from w w w . j ava 2s .com*/ private static byte[] decode(String src) { return Base64.decode(src, Base64.DEFAULT); } private static String getStringFromPrefsOrThow(SharedPreferences prefs, String key) { String val = prefs.getString(key, null); if (val == null) { throw new NullPointerException( "Trying to retrieve pin value before it's been set"); } return val; } }