Hawk-Secure, simple key-value storage for Android.

Hawk 2.0

Secure, simple key-value storage for android

Initialize

Hawk.init(context).build();

Use

Save any type (Any object, primitives, lists, sets, maps ...)
Hawk.put(key, T);
Get the original value with the original type
T value = Hawk.get(key);
Delete unwanted data
Hawk.delete(key);
Check if any key exists
Hawk.contains(key);
Check total count
Hawk.count();
Get crazy and delete everything
Hawk.deleteAll();

Download

compile 'com.orhanobut:hawk:2.0.1'

More options

  • Everything is pluggable, therefore you can change any layer with your custom implementation.
  • NoEncryption implementation is provided out of box If you want to disable crypto.
Hawk.init(context)
  .setEncryption(new NoEncryption())
  .setLogInterceptor(new MyLogInterceptor())
  .setConverter(new MyConverter())
  .setParser(new MyParser())
  .setStorage(new MyStorage())
  .build();

                          Source and download

No comments