Android Hash Code Calculate hash2jsonBytes(Map hash)

Here you can find the source of hash2jsonBytes(Map hash)

Description

hashjson Bytes

Declaration

public static byte[] hash2jsonBytes(Map<String, Object> hash) 

Method Source Code

//package com.java2s;
import java.util.Map;
import org.json.JSONException;
import org.json.JSONObject;

public class Main {
    public static byte[] hash2jsonBytes(Map<String, Object> hash) {
        String result = null;/*from   w w w. ja  v  a 2 s.c  o m*/
        JSONObject json = new JSONObject(hash);
        try {
            result = json.toString(2);
        } catch (JSONException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

        return result.getBytes();
    }
}

Related

  1. hash(String s, String algorithm)
  2. hash(char[] pin, byte[] salt)
  3. hash(int seed, Object o)
  4. hash(int seed, boolean x)
  5. hash(int seed, int x)
  6. hashBitmap(Bitmap bitmap)
  7. hashBitmap(Bitmap bitmap)
  8. hashCode(T a)
  9. hashCode(T a, T b)