Save SharedPreferences : SHA « Security « Android






Save SharedPreferences

 
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Vibrator;

 class Utils {

  public static SharedPreferences preferencias;
  public static Vibrator v;
  public static final int CORTO = 50;
  public static final int LARGO = 500;
  static public void guardarNombre(String id, String nombre){
    SharedPreferences.Editor editor = preferencias.edit();
      editor.putString(id, nombre);
      editor.commit();
  }
  
}  

   
  








Related examples in the same category

1.SHA-1 string
2.hmac Sha1 Digest
3.Sha1 hashes based on a given String
4.SHA1 Utils
5.Using SharedPreferences to store password
6.Using SharedPreferences
7.Drawing Shapes
8.Animated wallpaper draws a rotating wireframe shape with a choice of 2 shapes
9.Animation: shake
10.Get reference from SharedPreferences
11.Glutes shape
12.Reshaping Arabic Sentences and Text Utilities to deal with Arabic
13.Save value to SharedPreferences
14.SharedPreferences Set and get value
15.Compute the SHA-1 hash of the given byte array
16.compute SHA-1 Hash