This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.security.*; | |
public class Sha { | |
public static String hash256(String data) throws NoSuchAlgorithmException { | |
MessageDigest md = MessageDigest.getInstance("SHA-256"); | |
md.update(data.getBytes()); | |
return bytesToHex(md.digest()); | |
} | |
public static String bytesToHex(byte[] bytes) { | |
StringBuffer result = new StringBuffer(); | |
for (byte byt : bytes) result.append(Integer.toString((byt & 0xff) + 0x100, 16).substring(1)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"id":147, | |
"last_updated":1290507216000, | |
"date_created":1290507215000, | |
"created_by":"you", | |
"user_id":8, | |
"name":"Test", | |
"gender":"male", | |
"title":"Title", | |
"business":"Paradigma", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"contact":{ | |
"user_id":8, | |
"name":"Test", | |
"gender":"male", | |
"title":"Title", | |
"business":"Paradigma", | |
"data":[ | |
{"type":"telephone","value":"+15717483198", "rel":"work","is_primary":true}, | |
{"type":"email", "value":"[email protected]","label":"wow","is_primary":false} | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"updated":[130,131,132,133], | |
"deleted":[1,2,4], | |
"timestamp":1290506001724 } |