Drop unused base64 code
There are two base64 implementations in the Notepad2e source code.
Those files were moved to another folder in commit 42c30cd01a6f9f7489bf7d0bbf8b770498a7e163 and not deleted, despite another implementation was added.
@cshnik We don't actually use that base64 library anymore? See commit 42c30cd. Have you copied part of their code or was it rewritten from scratch? Do you remember why?
@cshnik We don't actually use that base64 library anymore? See commit 42c30cd. Have you copied part of their code or was it rewritten from scratch? Do you remember why?
The algorithm originally represented by base64_encode, base64_decode methods in this module (base64.h/cpp) was re-implemented for our recoding engine. Later it was moved to StrToBase64.h/cpp.
If such a reuse of the code can't treated as Redistribution and use in source and binary forms, with or without modification than we can remove these files.
base54-license.txt
Copyright (c) 2002-2012, Jouni Malinen [email protected] and contributors All Rights Reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name(s) of the above-listed copyright holder(s) nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
If the algorithm in StrToBase64.h/cpp is directly based/copied from base64.c/h, then this file needs the header.
You could also use ATL for base64 to get rid of any dependency (https://msdn.microsoft.com/vstudio/ezec6x4e(v=vs.100)).
If the algorithm in
StrToBase64.h/cppis directly based/copied frombase64.c/h, then this file needs the header.
Yes, that's why I'm asking.
@cshnik Why did you have to reimplement base64 functions? Was it to skip whitespace and other invalid symbols during decoding? (#181)
@cshnik Why did you have to reimplement base64 functions? Was it to skip whitespace and other invalid symbols during decoding? (#181)
For()-cycle presented in the original base64_encoded/base64_decode functions can't be directly used in our transcoding engine (which uses block-by-block scheme to provide UI responsiveness (no window freeze, provide progress bar updates)). Additional feature is input data filter which allow to skip invalid char sequence when decoding.
But the core idea/implementation is absolutely the same as provided in the original code.
What do you mean with "core idea"? Base64 is standardized.
What do you mean with "core idea"? Base64 is standardized.
He probably means that the code was adapted from base64.h/c. Don't worry, we'll add the copyright notice later to this unit when I get time.