equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2010 Remko Tronçon |
|
3 * Licensed under the GNU General Public License v3. |
|
4 * See Documentation/Licenses/GPLv3.txt for more information. |
|
5 */ |
|
6 /* |
|
7 * Copyright (c) 2010, Isode Limited, London, England. |
|
8 * All rights reserved. |
|
9 */ |
|
10 package com.isode.stroke.stringcodecs; |
|
11 |
|
12 import com.isode.stroke.base.ByteArray; |
|
13 |
|
14 public class Base64 { |
|
15 /* FIXME: Check license is ok (it is, it's BSD) */ |
|
16 public static ByteArray decode(String input) { |
|
17 return new ByteArray(Base64BSD.decode(input)); |
|
18 } |
|
19 |
|
20 public static String encode(ByteArray input) { |
|
21 return Base64BSD.encodeToString(input.getData(), false); |
|
22 } |
|
23 } |