@@ -0,0 +1,2033 @@
+/*%0A * Copyright 2010-2011 the original author or authors.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT c;pWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage griffon.util;%0A%0Aimport java.security.MessageDigest;%0Aimport java.security.NoSuchAlgorithmException;%0A%0A/**%0A * @author Andres Almiray%0A */%0Apublic final class MD5 %7B%0A    public static String encode(String str) throws IllegalArgumentException %7B%0A        if (str == null %7C%7C str.length() == 0) %7B%0A            throw new IllegalArgumentException(%22String to encode cannot be null or have zero length%22);%0A        %7D%0A%0A        return encode(str.getBytes());%0A    %7D%0A%0A    public static String encode(byte%5B%5D bytes) %7B%0A        if (bytes == null %7C%7C bytes.length == 0) %7B%0A            throw new IllegalArgumentException(%22Byte array to encode cannot be null or have zero length%22);%0A        %7D%0A%0A        MessageDigest digester = createDigester();%0A        digester.update(bytes);%0A        byte%5B%5D hash = digester.digest();%0A        StringBuffer hexString = new StringBuffer();%0A        for (int i = 0; i %3C hash.length; i++) %7B%0A            if ((0xff & hash%5Bi%5D) %3C 0x10) %7B%0A                hexString.append(%220%22 + Integer.toHexString((0xFF & hash%5Bi%5D)));%0A            %7D else %7B%0A                hexString.append(Integer.toHexString(0xFF & hash%5Bi%5D));%0A            %7D%0A        %7D%0A        return hexString.toString();%0A    %7D%0A%0A    private static MessageDigest createDigester() %7B%0A        try %7B%0A            return MessageDigest.getInstance(%22MD5%22);%0A        %7D catch (NoSuchAlgorithmException e) %7B%0A            throw new IllegalArgumentException(e);%0A        %7D%0A    %7D%0A%7D

Add encoding utility required to publish artifacts