| OLD | NEW |
| 1 /* | 1 /* |
| 2 Copyright (C) 2000-2001 Dawit Alemayehu <adawit@kde.org> | 2 Copyright (C) 2000-2001 Dawit Alemayehu <adawit@kde.org> |
| 3 Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org> | 3 Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org> |
| 4 Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 4 Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| 5 Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> | 5 Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> |
| 6 | 6 |
| 7 This program is free software; you can redistribute it and/or modify | 7 This program is free software; you can redistribute it and/or modify |
| 8 it under the terms of the GNU Lesser General Public License (LGPL) | 8 it under the terms of the GNU Lesser General Public License (LGPL) |
| 9 version 2 as published by the Free Software Foundation. | 9 version 2 as published by the Free Software Foundation. |
| 10 | 10 |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 out.shrink(outLength); | 202 out.shrink(outLength); |
| 203 | 203 |
| 204 return true; | 204 return true; |
| 205 } | 205 } |
| 206 | 206 |
| 207 bool base64Decode(const char* data, unsigned length, Vector<char>& out, Base64De
codePolicy policy) | 207 bool base64Decode(const char* data, unsigned length, Vector<char>& out, Base64De
codePolicy policy) |
| 208 { | 208 { |
| 209 return base64DecodeInternal<LChar>(reinterpret_cast<const LChar*>(data), len
gth, out, policy); | 209 return base64DecodeInternal<LChar>(reinterpret_cast<const LChar*>(data), len
gth, out, policy); |
| 210 } | 210 } |
| 211 | 211 |
| 212 bool base64Decode(const UChar* data, unsigned length, Vector<char>& out, Base64D
ecodePolicy policy) |
| 213 { |
| 214 return base64DecodeInternal<UChar>(data, length, out, policy); |
| 215 } |
| 216 |
| 212 bool base64Decode(const String& in, Vector<char>& out, Base64DecodePolicy policy
) | 217 bool base64Decode(const String& in, Vector<char>& out, Base64DecodePolicy policy
) |
| 213 { | 218 { |
| 214 if (in.isEmpty()) | 219 if (in.isEmpty()) |
| 215 return base64DecodeInternal<LChar>(0, 0, out, policy); | 220 return base64DecodeInternal<LChar>(0, 0, out, policy); |
| 216 if (in.is8Bit()) | 221 if (in.is8Bit()) |
| 217 return base64DecodeInternal<LChar>(in.characters8(), in.length(), out, p
olicy); | 222 return base64DecodeInternal<LChar>(in.characters8(), in.length(), out, p
olicy); |
| 218 return base64DecodeInternal<UChar>(in.characters16(), in.length(), out, poli
cy); | 223 return base64DecodeInternal<UChar>(in.characters16(), in.length(), out, poli
cy); |
| 219 } | 224 } |
| 220 | 225 |
| 221 } // namespace WTF | 226 } // namespace WTF |
| OLD | NEW |