@@ -0,0 +1,1144 @@
+package com.onebitmedia.pisolipet;%0A%0Aimport java.io.UnsupportedEncodingException;%0Aimport java.security.MessageDigest;%0Aimport java.security.NoSuchAlgorithmException;%0A%0Apublic class CryptoUtils %7B%0A    private static String convertToHex(byte%5B%5D data) %7B%0A        StringBuilder buf = new StringBuilder();%0A        for (byte b : data) %7B%0A            int halfByte = (b %3E%3E%3E 4) & 0x0F;%0A            int twoHalves = 0;%0A            do %7B%0A                buf.append((0 %3C= halfByte) && (halfByte %3C= 9) ? (char) ('0' + halfByte) : (char) ('a' + (halfByte - 10)));%0A                halfByte = b & 0x0F;%0A            %7D while (twoHalves++ %3C 1);%0A        %7D%0A        return buf.toString();%0A    %7D%0A%0A    public static String SHA1(String text) %7B%0A        MessageDigest md = null;%0A        try %7B%0A            md = MessageDigest.getInstance(%22SHA-1%22);%0A            md.update(text.getBytes(%22iso-8859-1%22), 0, text.length());%0A            byte%5B%5D sha1hash = md.digest();%0A            return convertToHex(sha1hash);%0A        %7D catch (NoSuchAlgorithmException ignored) %7B%0A            return null;%0A        %7D catch (UnsupportedEncodingException ignored) %7B%0A            return null;%0A        %7D%0A    %7D%0A%7D%0A

Add crypto utils