Index: Source/wtf/text/Base64.h |
diff --git a/Source/wtf/text/Base64.h b/Source/wtf/text/Base64.h |
index 7ccd8d1c7c858a408dba87e4e8803375c3c1f77c..4ebebc82dcb691503bf98e0f6ee635f6e48e35c2 100644 |
--- a/Source/wtf/text/Base64.h |
+++ b/Source/wtf/text/Base64.h |
@@ -39,17 +39,13 @@ enum Base64EncodePolicy { |
Base64InsertLFs |
}; |
-enum Base64InvalidCharactersPolicy { |
+enum Base64DecodePolicy { |
+ Base64FailOnInvalidCharacterOrExcessPadding, |
Base64FailOnInvalidCharacter, |
Base64IgnoreWhitespace, |
Base64IgnoreInvalidCharacters |
}; |
-enum Base64PaddingValidationPolicy { |
- Base64NoPaddingValidation, |
- Base64StrictPaddingValidation |
-}; |
- |
WTF_EXPORT void base64Encode(const char*, unsigned, Vector<char>&, Base64EncodePolicy = Base64DoNotInsertLFs); |
WTF_EXPORT void base64Encode(const Vector<char>&, Vector<char>&, Base64EncodePolicy = Base64DoNotInsertLFs); |
WTF_EXPORT void base64Encode(const CString&, Vector<char>&, Base64EncodePolicy = Base64DoNotInsertLFs); |
@@ -57,9 +53,9 @@ WTF_EXPORT String base64Encode(const char*, unsigned, Base64EncodePolicy = Base6 |
WTF_EXPORT String base64Encode(const Vector<char>&, Base64EncodePolicy = Base64DoNotInsertLFs); |
WTF_EXPORT String base64Encode(const CString&, Base64EncodePolicy = Base64DoNotInsertLFs); |
-WTF_EXPORT bool base64Decode(const String&, Vector<char>&, Base64InvalidCharactersPolicy = Base64FailOnInvalidCharacter, Base64PaddingValidationPolicy = Base64NoPaddingValidation); |
-WTF_EXPORT bool base64Decode(const Vector<char>&, Vector<char>&, Base64InvalidCharactersPolicy = Base64FailOnInvalidCharacter, Base64PaddingValidationPolicy = Base64NoPaddingValidation); |
-WTF_EXPORT bool base64Decode(const char*, unsigned, Vector<char>&, Base64InvalidCharactersPolicy = Base64FailOnInvalidCharacter, Base64PaddingValidationPolicy = Base64NoPaddingValidation); |
+WTF_EXPORT bool base64Decode(const String&, Vector<char>&, Base64DecodePolicy = Base64FailOnInvalidCharacter); |
+WTF_EXPORT bool base64Decode(const Vector<char>&, Vector<char>&, Base64DecodePolicy = Base64FailOnInvalidCharacter); |
+WTF_EXPORT bool base64Decode(const char*, unsigned, Vector<char>&, Base64DecodePolicy = Base64FailOnInvalidCharacter); |
inline void base64Encode(const Vector<char>& in, Vector<char>& out, Base64EncodePolicy policy) |
{ |
@@ -86,13 +82,11 @@ inline String base64Encode(const CString& in, Base64EncodePolicy policy) |
using WTF::Base64EncodePolicy; |
using WTF::Base64DoNotInsertLFs; |
using WTF::Base64InsertLFs; |
-using WTF::Base64InvalidCharactersPolicy; |
+using WTF::Base64DecodePolicy; |
+using WTF::Base64FailOnInvalidCharacterOrExcessPadding; |
using WTF::Base64FailOnInvalidCharacter; |
using WTF::Base64IgnoreWhitespace; |
using WTF::Base64IgnoreInvalidCharacters; |
-using WTF::Base64PaddingValidationPolicy; |
-using WTF::Base64NoPaddingValidation; |
-using WTF::Base64StrictPaddingValidation; |
using WTF::base64Encode; |
using WTF::base64Decode; |