| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org> | 2 * Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org> |
| 3 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> | 3 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 WTF_EXPORT void base64Encode(const char*, unsigned, Vector<char>&, Base64EncodeP
olicy = Base64DoNotInsertLFs); | 49 WTF_EXPORT void base64Encode(const char*, unsigned, Vector<char>&, Base64EncodeP
olicy = Base64DoNotInsertLFs); |
| 50 WTF_EXPORT void base64Encode(const Vector<char>&, Vector<char>&, Base64EncodePol
icy = Base64DoNotInsertLFs); | 50 WTF_EXPORT void base64Encode(const Vector<char>&, Vector<char>&, Base64EncodePol
icy = Base64DoNotInsertLFs); |
| 51 WTF_EXPORT void base64Encode(const CString&, Vector<char>&, Base64EncodePolicy =
Base64DoNotInsertLFs); | 51 WTF_EXPORT void base64Encode(const CString&, Vector<char>&, Base64EncodePolicy =
Base64DoNotInsertLFs); |
| 52 WTF_EXPORT String base64Encode(const char*, unsigned, Base64EncodePolicy = Base6
4DoNotInsertLFs); | 52 WTF_EXPORT String base64Encode(const char*, unsigned, Base64EncodePolicy = Base6
4DoNotInsertLFs); |
| 53 WTF_EXPORT String base64Encode(const Vector<char>&, Base64EncodePolicy = Base64D
oNotInsertLFs); | 53 WTF_EXPORT String base64Encode(const Vector<char>&, Base64EncodePolicy = Base64D
oNotInsertLFs); |
| 54 WTF_EXPORT String base64Encode(const CString&, Base64EncodePolicy = Base64DoNotI
nsertLFs); | 54 WTF_EXPORT String base64Encode(const CString&, Base64EncodePolicy = Base64DoNotI
nsertLFs); |
| 55 | 55 |
| 56 WTF_EXPORT bool base64Decode(const String&, Vector<char>&, Base64DecodePolicy =
Base64FailOnInvalidCharacter); | 56 WTF_EXPORT bool base64Decode(const String&, Vector<char>&, Base64DecodePolicy =
Base64FailOnInvalidCharacter); |
| 57 WTF_EXPORT bool base64Decode(const Vector<char>&, Vector<char>&, Base64DecodePol
icy = Base64FailOnInvalidCharacter); | 57 WTF_EXPORT bool base64Decode(const Vector<char>&, Vector<char>&, Base64DecodePol
icy = Base64FailOnInvalidCharacter); |
| 58 WTF_EXPORT bool base64Decode(const char*, unsigned, Vector<char>&, Base64DecodeP
olicy = Base64FailOnInvalidCharacter); | 58 WTF_EXPORT bool base64Decode(const char*, unsigned, Vector<char>&, Base64DecodeP
olicy = Base64FailOnInvalidCharacter); |
| 59 WTF_EXPORT bool base64Decode(const UChar*, unsigned, Vector<char>&, Base64Decode
Policy = Base64FailOnInvalidCharacter); |
| 59 | 60 |
| 60 inline void base64Encode(const Vector<char>& in, Vector<char>& out, Base64Encode
Policy policy) | 61 inline void base64Encode(const Vector<char>& in, Vector<char>& out, Base64Encode
Policy policy) |
| 61 { | 62 { |
| 62 base64Encode(in.data(), in.size(), out, policy); | 63 base64Encode(in.data(), in.size(), out, policy); |
| 63 } | 64 } |
| 64 | 65 |
| 65 inline void base64Encode(const CString& in, Vector<char>& out, Base64EncodePolic
y policy) | 66 inline void base64Encode(const CString& in, Vector<char>& out, Base64EncodePolic
y policy) |
| 66 { | 67 { |
| 67 base64Encode(in.data(), in.length(), out, policy); | 68 base64Encode(in.data(), in.length(), out, policy); |
| 68 } | 69 } |
| (...skipping 15 matching lines...) Expand all Loading... |
| 84 using WTF::Base64InsertLFs; | 85 using WTF::Base64InsertLFs; |
| 85 using WTF::Base64DecodePolicy; | 86 using WTF::Base64DecodePolicy; |
| 86 using WTF::Base64FailOnInvalidCharacterOrExcessPadding; | 87 using WTF::Base64FailOnInvalidCharacterOrExcessPadding; |
| 87 using WTF::Base64FailOnInvalidCharacter; | 88 using WTF::Base64FailOnInvalidCharacter; |
| 88 using WTF::Base64IgnoreWhitespace; | 89 using WTF::Base64IgnoreWhitespace; |
| 89 using WTF::Base64IgnoreInvalidCharacters; | 90 using WTF::Base64IgnoreInvalidCharacters; |
| 90 using WTF::base64Encode; | 91 using WTF::base64Encode; |
| 91 using WTF::base64Decode; | 92 using WTF::base64Decode; |
| 92 | 93 |
| 93 #endif // Base64_h | 94 #endif // Base64_h |
| OLD | NEW |