001 package railo.commons.lang; 002 003 import java.io.IOException; 004 005 006 public class KeyGenerator { 007 public static String createKey(String value) throws IOException{ 008 // create a crossfoot of the string and change result in constealltion of the position 009 long sum=0; 010 for(int i=value.length()-1;i>=0;i--){ 011 sum+=((long)value.charAt(i))*((i%3+1)/2f); 012 } 013 return Md5.getDigestAsString(value)+":"+sum; 014 } 015 }