Skip to content

Commit

Permalink
update for last commit
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4325 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
borg-0300 committed Jan 12, 2008
1 parent 53367d9 commit 3cab851
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 18 deletions.
10 changes: 0 additions & 10 deletions source/de/anomic/kelondro/kelondroBase64Order.java
Expand Up @@ -398,14 +398,4 @@ public static void main(String[] s) {
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;
}
}
4 changes: 2 additions & 2 deletions source/de/anomic/kelondro/kelondroCoding.java
Expand Up @@ -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);

}
2 changes: 1 addition & 1 deletion source/de/anomic/plasma/parser/vcf/vcfParser.java
Expand Up @@ -167,7 +167,7 @@ public plasmaParserDocument parse(yacyURL location, String mimeType, String char
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
Expand Down
10 changes: 5 additions & 5 deletions source/de/anomic/tools/cryptbig.java
Expand Up @@ -160,7 +160,7 @@ public String encryptString(String str) {
// 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;
Expand Down Expand Up @@ -400,7 +400,7 @@ public static String descrambleString(String key, String s) {
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;
Expand Down Expand Up @@ -440,8 +440,8 @@ public static String simpleDecode(String encoded, String key) {
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;
}
Expand Down Expand Up @@ -605,7 +605,7 @@ public static void main(String[] s) {
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")) {
Expand Down

0 comments on commit 3cab851

Please sign in to comment.