private static String sanitizeKey(String Key,int mode){

                int len = Key.length();
                if (len==0){
                        String sanitizedKey = "";
                        for (int i=0; i<len; ++i){
                                int val = Key.charAt(i);
                                switch(val){
                                        case 0:{
                                                sanitizedKey+="/%DCN000%/";
                                                break;
                                        }
                                        case 5:{
                                                sanitizedKey+="/%DCN005%/";
                                                break;
                                        }
                                        case 36:{
                                                sanitizedKey+="/%DCN036%/";
                                                break;
                                        }
                                        case 96:{
                                                sanitizedKey+="/%DCN096%/";
                                                break;
                                        }
                                        case 124:{
                                                sanitizedKey+="/%DCN124%/";
                                                break;
                                        }
                                        case 126:{
                                                sanitizedKey+="/%DCN126%/";
                                                break;
                                        }
                                        default:{
                                                sanitizedKey+=""+Key.charAt(i);
                                                break;
                                        }
                                }
                        }
                        return sanitizedKey;
                }
                else{
                        Key=Key.replaceAll("/%DCN000%/",String.valueOf(Character.toChars(0)));
                        Key=Key.replaceAll("/%DCN005%/",String.valueOf(Character.toChars(5)));
                        Key=Key.replaceAll("/%DCN036%/",String.valueOf(Character.toChars(36)));
                        Key=Key.replaceAll("/%DCN096%/",String.valueOf(Character.toChars(96)));
                        Key=Key.replaceAll("/%DCN124%/",String.valueOf(Character.toChars(124)));
                        Key=Key.replaceAll("/%DCN126%/",String.valueOf(Character.toChars(126)));
                        return Key;
                }
        }