From 3cab85158cf2e4a8a4b1a9242e421a2211492de9 Mon Sep 17 00:00:00 2001 From: borg-0300 Date: Sat, 12 Jan 2008 00:41:45 +0000 Subject: [PATCH] update for last commit git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4325 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/kelondro/kelondroBase64Order.java | 10 ---------- source/de/anomic/kelondro/kelondroCoding.java | 4 ++-- source/de/anomic/plasma/parser/vcf/vcfParser.java | 2 +- source/de/anomic/tools/cryptbig.java | 10 +++++----- 4 files changed, 8 insertions(+), 18 deletions(-) diff --git a/source/de/anomic/kelondro/kelondroBase64Order.java b/source/de/anomic/kelondro/kelondroBase64Order.java index a94692659..97c76777b 100644 --- a/source/de/anomic/kelondro/kelondroBase64Order.java +++ b/source/de/anomic/kelondro/kelondroBase64Order.java @@ -398,14 +398,4 @@ public class kelondroBase64Order extends kelondroAbstractOrder implement System.out.println(b64.decodeString(s[1], "")); } } - - public byte[] decode(String in) { - // TODO Auto-generated method stub - return null; - } - - public String decodeString(String in) { - // TODO Auto-generated method stub - return null; - } } diff --git a/source/de/anomic/kelondro/kelondroCoding.java b/source/de/anomic/kelondro/kelondroCoding.java index 1968487c2..1a71a8e04 100644 --- a/source/de/anomic/kelondro/kelondroCoding.java +++ b/source/de/anomic/kelondro/kelondroCoding.java @@ -55,9 +55,9 @@ public interface kelondroCoding { public long decodeLong(String s); public String encodeString(String in); - public String decodeString(String in); + public String decodeString(String in, String info); public String encode(byte[] in); - public byte[] decode(String in); + public byte[] decode(String in, String info); } diff --git a/source/de/anomic/plasma/parser/vcf/vcfParser.java b/source/de/anomic/plasma/parser/vcf/vcfParser.java index 2130faa9c..5899588e3 100644 --- a/source/de/anomic/plasma/parser/vcf/vcfParser.java +++ b/source/de/anomic/plasma/parser/vcf/vcfParser.java @@ -167,7 +167,7 @@ public class vcfParser extends AbstractParser implements Parser { if (!useLastLine) value += line.trim(); else break; } while (line.length()!=0); - value = kelondroBase64Order.standardCoder.decodeString(value); + value = kelondroBase64Order.standardCoder.decodeString(value, "de.anomic.plasma.parser.vcf.vcfParser.parse(...)"); } } catch (Exception ey) { // Encoding error: This could occure e.g. if the base64 doesn't diff --git a/source/de/anomic/tools/cryptbig.java b/source/de/anomic/tools/cryptbig.java index d1d999c7e..2e4e50067 100644 --- a/source/de/anomic/tools/cryptbig.java +++ b/source/de/anomic/tools/cryptbig.java @@ -160,7 +160,7 @@ public class cryptbig { // Decode a string into a new string using b64, crypt and utf-8 public String decryptString(String str) { try { - byte[] b64dec = kelondroBase64Order.standardCoder.decode(str); + byte[] b64dec = kelondroBase64Order.standardCoder.decode(str, "de.anomic.tools.cryptbig.decryptString()"); if (b64dec == null) return null; // error in input string (inconsistency) byte[] dec = decryptArray(b64dec); if (dec == null) return null; @@ -400,7 +400,7 @@ public class cryptbig { boolean gzFlag = (s.charAt(8) == '1'); s = s.substring(9); cryptbig c = new cryptbig(key, salt); - byte[] b64dec = kelondroBase64Order.enhancedCoder.decode(s); + byte[] b64dec = kelondroBase64Order.enhancedCoder.decode(s, "de.anomic.tools.cryptbig.descrambleString()"); if (b64dec == null) return null; // error in input string (inconsistency) byte[] dec = c.decryptArray(b64dec); if (dec == null) return null; @@ -440,8 +440,8 @@ public class cryptbig { char method = encoded.charAt(0); encoded = encoded.substring(2); if (method == 'p') return encoded; - if (method == 'b') return kelondroBase64Order.enhancedCoder.decodeString(encoded); - if (method == 'z') return gzip.gunzipString(kelondroBase64Order.enhancedCoder.decode(encoded)); + if (method == 'b') return kelondroBase64Order.enhancedCoder.decodeString(encoded, "de.anomic.tools.cryptbig.simpleDecode()"); + if (method == 'z') return gzip.gunzipString(kelondroBase64Order.enhancedCoder.decode(encoded, "de.anomic.tools.cryptbig.simpleDecode()")); if (method == 'c') return descrambleString(key, encoded); return null; } @@ -605,7 +605,7 @@ public class cryptbig { if (s[0].equals("-ds64")) { // generate a b64 decoding from a given string if (s.length != 2) {help(); System.exit(-1);} - System.out.println(kelondroBase64Order.standardCoder.decodeString(s[1])); + System.out.println(kelondroBase64Order.standardCoder.decodeString(s[1], "")); System.exit(0); } if (s[0].equals("-ess")) {