Lines 18-25
Link Here
|
18 |
|
18 |
|
19 |
import java.io.IOException; |
19 |
import java.io.IOException; |
20 |
|
20 |
|
21 |
import sun.misc.BASE64Decoder; |
21 |
import gnu.crypto.util.Base64; |
22 |
import sun.misc.BASE64Encoder; |
|
|
23 |
|
22 |
|
24 |
|
23 |
|
25 |
/** |
24 |
/** |
Lines 33-43
Link Here
|
33 |
} |
32 |
} |
34 |
|
33 |
|
35 |
public static byte[] decode(String pValue) throws IOException { |
34 |
public static byte[] decode(String pValue) throws IOException { |
36 |
return (new BASE64Decoder()).decodeBuffer(pValue); |
35 |
return Base64.decode(pValue); |
37 |
} |
36 |
} |
38 |
|
37 |
|
39 |
public static String encode(byte[] pValue) { |
38 |
public static String encode(byte[] pValue) { |
40 |
return (new BASE64Encoder()).encode(pValue); |
39 |
return Base64.encode(pValue); |
41 |
} |
40 |
} |
42 |
|
41 |
|
43 |
public static void main(String[] args) throws Exception { |
42 |
public static void main(String[] args) throws Exception { |