blob: f1e3f1b1f1d32c048019462100e1b76c4d23f00c [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.codec.binary;
/**
* This random data was encoded by OpenSSL. Java had nothing to do with it. This data helps us test interop between
* Commons-Codec and OpenSSL. Notice that OpenSSL creates 64 character lines instead of the 76 of Commons-Codec.
*
* @see <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a>
* @since 1.4
*/
public class Base64TestData {
/**
* A valid base 64 encoding that has a length that is a multiple of 3.
* @see <a href="https://issues.apache.org/jira/browse/CODEC-101">Codec 101</a>
*/
public static final String CODEC_101_INPUT_LENGTH_IS_MULTIPLE_OF_3 = "124";
public static final String CODEC_98_NPE =
"YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXpBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWjAxMjM";
public static final String CODEC_98_NPE_DECODED =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123";
// OpenSSL doesn't include the final \n, but it would be annoying beyond belief
// to further parameterize commons-codec to support this pointless variation.
final static String ENCODED_64_CHARS_PER_LINE =
"9IPNKwUvdLiIAp6ctz12SiQmOGstWyYvSPeevufDhrzaws65voykKjbIj33YWTa9\n" +
"xA7c/FHypWclrZhQ7onfc3JE93BJ5fT4R9zAEdjbjy1hv4ZYNnET4WJeXMLJ/5p+\n" +
"qBpTsPpepW8DNVYy1c02/1wyC+kgA6CvRUd9cSr/lt88AEdsTV4GMCn1+E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