Home
last modified time | relevance | path

Searched full:base64 (Results 1 – 25 of 9260) sorted by relevance

12345678910>>...371

/aosp_15_r20/external/python/cpython3/Lib/test/
Dtest_base64.py2 import base64
23 eq(base64.encodebytes(b"www.python.org"), b"d3d3LnB5dGhvbi5vcmc=\n")
24 eq(base64.encodebytes(b"a"), b"YQ==\n")
25 eq(base64.encodebytes(b"ab"), b"YWI=\n")
26 eq(base64.encodebytes(b"abc"), b"YWJj\n")
27 eq(base64.encodebytes(b""), b"")
28 eq(base64.encodebytes(b"abcdefghijklmnopqrstuvwxyz"
35 eq(base64.encodebytes(bytearray(b'abc')), b'YWJj\n')
36 eq(base64.encodebytes(memoryview(b'abc')), b'YWJj\n')
37 eq(base64.encodebytes(array('B', b'abc')), b'YWJj\n')
[all …]
/aosp_15_r20/external/python/cpython2/Lib/test/
Dtest_base64.py3 import base64
10 eq(base64.encodestring("www.python.org"), "d3d3LnB5dGhvbi5vcmc=\n")
11 eq(base64.encodestring("a"), "YQ==\n")
12 eq(base64.encodestring("ab"), "YWI=\n")
13 eq(base64.encodestring("abc"), "YWJj\n")
14 eq(base64.encodestring(""), "")
15 eq(base64.encodestring("abcdefghijklmnopqrstuvwxyz"
22 eq(base64.encodestring(bytearray('abc')), 'YWJj\n')
26 eq(base64.decodestring("d3d3LnB5dGhvbi5vcmc=\n"), "www.python.org")
27 eq(base64.decodestring("YQ==\n"), "a")
[all …]
/aosp_15_r20/cts/tests/tests/util/src/android/util/cts/
H A DBase64Test.java23 import android.util.Base64;
51 byte[] out = Base64.decode(in, 0); in decodeString()
60 String b64 = Base64.encodeToString(in.getBytes(), flags); in encodeToString()
69 byte[] out = Base64.decode(in, 0); in assertBad()
140 assertPartialEquals(BYTES, 0, Base64.decode("", 0)); in testBinaryDecode()
141 assertPartialEquals(BYTES, 1, Base64.decode("/w==", 0)); in testBinaryDecode()
142 assertPartialEquals(BYTES, 2, Base64.decode("/+4=", 0)); in testBinaryDecode()
143 assertPartialEquals(BYTES, 3, Base64.decode("/+7d", 0)); in testBinaryDecode()
144 assertPartialEquals(BYTES, 4, Base64.decode("/+7dzA==", 0)); in testBinaryDecode()
145 assertPartialEquals(BYTES, 5, Base64.decode("/+7dzLs=", 0)); in testBinaryDecode()
[all …]
/aosp_15_r20/frameworks/base/core/tests/coretests/src/android/util/
H A DBase64Test.java48 byte[] out = Base64.decode(in, 0); in decodeString()
57 String b64 = Base64.encodeToString(in.getBytes(), flags); in encodeToString()
66 byte[] out = Base64.decode(in, 0); in assertBad()
137 assertPartialEquals(BYTES, 0, Base64.decode("", 0)); in testBinaryDecode()
138 assertPartialEquals(BYTES, 1, Base64.decode("/w==", 0)); in testBinaryDecode()
139 assertPartialEquals(BYTES, 2, Base64.decode("/+4=", 0)); in testBinaryDecode()
140 assertPartialEquals(BYTES, 3, Base64.decode("/+7d", 0)); in testBinaryDecode()
141 assertPartialEquals(BYTES, 4, Base64.decode("/+7dzA==", 0)); in testBinaryDecode()
142 assertPartialEquals(BYTES, 5, Base64.decode("/+7dzLs=", 0)); in testBinaryDecode()
143 assertPartialEquals(BYTES, 6, Base64.decode("/+7dzLuq", 0)); in testBinaryDecode()
[all …]
/aosp_15_r20/libcore/ojluni/src/test/java/util/Base64/
H A DTestBase64.java28 * @summary tests java.util.Base64
35 package test.java.util.Base64;
47 import java.util.Base64;
66 test(Base64.getEncoder(), Base64.getDecoder(), numRuns, numBytes); in main()
67 test(Base64.getUrlEncoder(), Base64.getUrlDecoder(), numRuns, numBytes); in main()
68 test(Base64.getMimeEncoder(), Base64.getMimeDecoder(), numRuns, numBytes); in main()
75 test(Base64.getMimeEncoder(len, nl_1), in main()
76 Base64.getMimeDecoder(), in main()
78 test(Base64.getMimeEncoder(len, nl_2), in main()
79 Base64.getMimeDecoder(), in main()
[all …]
/aosp_15_r20/external/tink/java_src/src/test/java/com/google/crypto/tink/subtle/
H A DBase64Test.java29 assertThat(Base64.encode(new byte[] {})).isEqualTo(""); in testEncode_testVectors()
30 assertThat(Base64.encode(new byte[] {0})).isEqualTo("AA=="); in testEncode_testVectors()
31 assertThat(Base64.encode(new byte[] {0, 0})).isEqualTo("AAA="); in testEncode_testVectors()
32 assertThat(Base64.encode(new byte[] {0, 0, 0})).isEqualTo("AAAA"); in testEncode_testVectors()
33 assertThat(Base64.encode(new byte[] {0, 0, 25})).isEqualTo("AAAZ"); in testEncode_testVectors()
34 assertThat(Base64.encode(new byte[] {0, 0, 26})).isEqualTo("AAAa"); in testEncode_testVectors()
35 assertThat(Base64.encode(new byte[] {0, 0, 51})).isEqualTo("AAAz"); in testEncode_testVectors()
36 assertThat(Base64.encode(new byte[] {0, 0, 52})).isEqualTo("AAA0"); in testEncode_testVectors()
37 assertThat(Base64.encode(new byte[] {0, 0, 61})).isEqualTo("AAA9"); in testEncode_testVectors()
38 assertThat(Base64.encode(new byte[] {0, 0, 62})).isEqualTo("AAA+"); in testEncode_testVectors()
[all …]
/aosp_15_r20/out/soong/.intermediates/external/rust/android-crates-io/crates/base64/libbase64_rust/android_arm64_armv8-2a_cortex-a55_rlib_rlib-std_apex31/
Dlibbase64_rust.rlib.d.raw1base64/libbase64_rust/android_arm64_armv8-2a_cortex-a55_rlib_rlib-std_apex31/libbase64_rust.rlib: …
3base64/libbase64_rust/android_arm64_armv8-2a_cortex-a55_rlib_rlib-std_apex31/libbase64_rust.rlib.d…
5 external/rust/android-crates-io/crates/base64/src/lib.rs:
6 external/rust/android-crates-io/crates/base64/src/chunked_encoder.rs:
7 external/rust/android-crates-io/crates/base64/src/display.rs:
8 external/rust/android-crates-io/crates/base64/src/read/mod.rs:
9 external/rust/android-crates-io/crates/base64/src/read/decoder.rs:
10 external/rust/android-crates-io/crates/base64/src/write/mod.rs:
11 external/rust/android-crates-io/crates/base64/src/write/encoder.rs:
12 external/rust/android-crates-io/crates/base64/src/write/encoder_string_writer.rs:
[all …]
/aosp_15_r20/out/soong/.intermediates/libcore/core_oj_api_files/gen/18/libcore/ojluni/src/main/java/java/util/
DBase64.java39 * encoders and decoders for the Base64 encoding scheme. The
40 * implementation of this class supports the following types of Base64
47 * <p> Uses "The Base64 Alphabet" as specified in Table 1 of
51 * outside the base64 alphabet.</p></li>
54 * <p> Uses the "URL and Filename safe Base64 Alphabet" as specified
58 * base64 alphabet.</p></li>
61 * <p> Uses "The Base64 Alphabet" as specified in Table 1 of
67 * or other characters not found in the base64 alphabet table are
79 public class Base64 { class
81 private Base64() {} in Base64() method in Base64
[all …]
/aosp_15_r20/out/soong/.intermediates/libcore/core_oj_api_files/gen/gensrcs/libcore/ojluni/src/main/java/java/util/
DBase64.java39 * encoders and decoders for the Base64 encoding scheme. The
40 * implementation of this class supports the following types of Base64
47 * <p> Uses "The Base64 Alphabet" as specified in Table 1 of
51 * outside the base64 alphabet.</p></li>
54 * <p> Uses the "URL and Filename safe Base64 Alphabet" as specified
58 * base64 alphabet.</p></li>
61 * <p> Uses "The Base64 Alphabet" as specified in Table 1 of
67 * or other characters not found in the base64 alphabet table are
79 public class Base64 { class
81 private Base64() {} in Base64() method in Base64
[all …]
/aosp_15_r20/libcore/ojluni/src/main/java/java/util/
H A DBase64.java39 * encoders and decoders for the Base64 encoding scheme. The
40 * implementation of this class supports the following types of Base64
47 * <p> Uses "The Base64 Alphabet" as specified in Table 1 of
51 * outside the base64 alphabet.</p></li>
54 * <p> Uses the "URL and Filename safe Base64 Alphabet" as specified
58 * base64 alphabet.</p></li>
61 * <p> Uses "The Base64 Alphabet" as specified in Table 1 of
67 * or other characters not found in the base64 alphabet table are
79 public class Base64 { class
81 private Base64() {} in Base64() method in Base64
[all …]
/aosp_15_r20/libcore/luni/src/test/java/libcore/java/util/
H A DBase64Test.java29 import java.util.Base64;
30 import java.util.Base64.Decoder;
31 import java.util.Base64.Encoder;
71 checkAlphabet(TABLE_1, "", Base64.getEncoder()); in testAlphabet_plain()
75 checkAlphabet(TABLE_1, "\r\n", Base64.getMimeEncoder()); in testAlphabet_mime()
79 checkAlphabet(TABLE_2, "", Base64.getUrlEncoder()); in testAlphabet_url()
84 assertEquals("Base64 alphabet size must be 64 characters", 64, expectedAlphabet.size()); in checkAlphabet()
112 Decoder basicDecoder = Base64.getDecoder(); // uses Table 1 in testDecoder_extraChars_basic()
127 Decoder urlDecoder = Base64.getUrlDecoder(); // uses Table 2 in testDecoder_extraChars_url()
216 Decoder mimeDecoder = Base64.getMimeDecoder(); in testDecoder_extraChars_mime()
[all …]
/aosp_15_r20/external/mbedtls/tests/suites/
H A Dtest_suite_base64.data67 Base64 decode (Illegal character)
70 Base64 decode (Too much equal signs)
73 Base64 decode (Invalid char after equal signs)
76 Base64 decode (Space inside string)
79 Base64 decode "Zm9vYmFy" (no newline nor '\0' at end)
82 Base64 decode "Zm9vYmFy\n" (LF at end)
85 Base64 decode "Zm9vYmFy\r\n" (CRLF at end)
88 Base64 decode "Zm9vYmFy\r" (CR at end)
91 Base64 decode "Zm9vYmFy " (SP at end)
94 Base64 decode "Zm9vYmFy \n" (SP+LF at end)
[all …]
/aosp_15_r20/external/openthread/third_party/mbedtls/repo/tests/suites/
H A Dtest_suite_base64.data67 Base64 decode (Illegal character)
70 Base64 decode (Too much equal signs)
73 Base64 decode (Invalid char after equal signs)
76 Base64 decode (Space inside string)
79 Base64 decode "Zm9vYmFy" (no newline nor '\0' at end)
82 Base64 decode "Zm9vYmFy\n" (LF at end)
85 Base64 decode "Zm9vYmFy\r\n" (CRLF at end)
88 Base64 decode "Zm9vYmFy\r" (CR at end)
91 Base64 decode "Zm9vYmFy " (SP at end)
94 Base64 decode "Zm9vYmFy \n" (SP+LF at end)
[all …]
/aosp_15_r20/external/pigweed/pw_base64/public/pw_base64/
H A Dbase64.h15 // Functions for encoding and decoding data in Base64 as specified by RFC 3548
27 // Returns the size of the given number of bytes when encoded as Base64. Base64
29 // Equivalent to pw::base64::EncodedSize().
33 // Encodes the provided data in Base64 and writes the result to the buffer.
37 // Equivalent to pw::base64::Encode().
42 // Evaluates to the maximum size of decoded Base64 data in bytes.
44 // Equivalent to pw::base64::MaxDecodedSize().
48 // Decodes the provided Base64 data into raw binary. The output buffer *MUST* be
51 // Equivalent to pw::base64::Decode().
52 size_t pw_Base64Decode(const char* base64,
[all …]
/aosp_15_r20/external/sl4a/Common/src/org/apache/commons/codec/binary/
H A DBase64Codec.java28 * Provides Base64 encoding and decoding as defined by RFC 2045.
31 …* This class implements section <cite>6.8. Base64 Content-Transfer-Encoding</cite> from RFC 2045 <…
50 * @version $Id: Base64.java 801706 2009-08-06 16:27:06Z niallp $
81 … is a lookup table that translates 6-bit positive integer index values into their "Base64 Alphabet"
97 * changed to - and _ to make the encoded Base64 results more URL-SAFE.
98 * This table is only used when the Base64's mode is set to URL-SAFE.
114 …* This array is a lookup table that translates Unicode characters drawn from the "Base64 Alphabet"…
115 …1 of RFC 2045) into their 6-bit positive integer equivalents. Characters that are not in the Base64
119 …* URL_SAFE and STANDARD base64. (The encoder, on the other hand, needs to know ahead of time what …
137 /** Mask used to extract 8 bits, used in decoding base64 bytes */
[all …]
/aosp_15_r20/art/test/693-vdex-inmem-loader-evict/src/
H A DMain.java21 import java.util.Base64;
145 private static final byte[] DEX_BYTES_BASE = Base64.getDecoder().decode(
161 Base64.getDecoder().decode("R1Yw40PVkNk0ns2dHsRR9NIb5Sa3p6rz"),
162 Base64.getDecoder().decode("i1V1U3C8nexVk4uw185lXZd9kzd82iaA"),
163 Base64.getDecoder().decode("tFPbVPdpzuoDWqH71Ak5HpltBHg0frMU"),
164 Base64.getDecoder().decode("eFSc7dENiK8nxviKBmd/O2s7h/NAj+l/"),
165 Base64.getDecoder().decode("DlUfNQ3cuVrCHRyw/cOFhqEe+0r6wlUP"),
166 Base64.getDecoder().decode("KVaBmdG8Y8kx8ltEPXWyi9OCdL14yeiW"),
167 Base64.getDecoder().decode("K1bioDTHtPwmrPXkvZ0XYCiripH6KsC2"),
168 Base64.getDecoder().decode("oVHctdpHG3YTNeQlVCshTkFKVra9TG4k"),
[all …]
/aosp_15_r20/external/guava/android/guava-tests/test/com/google/common/io/
H A DBaseEncodingTest.java20 import static com.google.common.io.BaseEncoding.base64;
50 testEncodes(base64().withSeparator("\n", 3), "foobar", "Zm9\nvYm\nFy"); in testSeparatorsExplicitly()
51 testEncodes(base64().withSeparator("$", 4), "foobar", "Zm9v$YmFy"); in testSeparatorsExplicitly()
57 base64().withSeparator("=", 3); in testSeparatorSameAsPadChar()
63 base64().withPadChar('#').withSeparator("!#!", 3); in testSeparatorSameAsPadChar()
70 BaseEncoding separated = base64().withSeparator("\n", 3); in testAtMostOneSeparator()
80 testEncodingWithSeparators(base64(), "", ""); in testBase64()
81 testEncodingWithSeparators(base64(), "f", "Zg=="); in testBase64()
82 testEncodingWithSeparators(base64(), "fo", "Zm8="); in testBase64()
83 testEncodingWithSeparators(base64(), "foo", "Zm9v"); in testBase64()
[all …]
/aosp_15_r20/external/guava/guava-tests/test/com/google/common/io/
H A DBaseEncodingTest.java20 import static com.google.common.io.BaseEncoding.base64;
50 testEncodes(base64().withSeparator("\n", 3), "foobar", "Zm9\nvYm\nFy"); in testSeparatorsExplicitly()
51 testEncodes(base64().withSeparator("$", 4), "foobar", "Zm9v$YmFy"); in testSeparatorsExplicitly()
57 base64().withSeparator("=", 3); in testSeparatorSameAsPadChar()
63 base64().withPadChar('#').withSeparator("!#!", 3); in testSeparatorSameAsPadChar()
70 BaseEncoding separated = base64().withSeparator("\n", 3); in testAtMostOneSeparator()
80 testEncodingWithSeparators(base64(), "", ""); in testBase64()
81 testEncodingWithSeparators(base64(), "f", "Zg=="); in testBase64()
82 testEncodingWithSeparators(base64(), "fo", "Zm8="); in testBase64()
83 testEncodingWithSeparators(base64(), "foo", "Zm9v"); in testBase64()
[all …]
/aosp_15_r20/external/snakeyaml/src/main/java/org/yaml/snakeyaml/external/biz/base64Coder/
H A DBase64Coder.java19 * A Base64 encoder/decoder.
22 * This class is used to encode and decode data in Base64 format as described in RFC 1521.
35 // Mapping table from 6-bit nibbles to Base64 characters.
53 // Mapping table from Base64 characters to 6-bit nibbles.
66 * Encodes a string into Base64 format. No blanks or line breaks are inserted.
69 * @return A String containing the Base64 encoded data.
80 * @return A String containing the Base64 encoded data, broken into lines.
94 * @return A String containing the Base64 encoded data, broken into lines.
116 * Encodes a byte array into Base64 format. No blanks or line breaks are inserted in the output.
119 * @return A character array containing the Base64 encoded data.
[all …]
/aosp_15_r20/packages/modules/AdServices/sdksandbox/tests/testutils/device-side/android/app/sdksandbox/testutils/
DProtoUtil.java21 import android.util.Base64;
56 return Base64.encodeToString( in encodeContentProviderAllowlist()
57 contentProviderAllowlists.toByteArray(), Base64.NO_PADDING | Base64.NO_WRAP); in encodeContentProviderAllowlist()
64 return Base64.encodeToString( in encodeContentProviderAllowlist()
65 allowedContentProvidersBuilder.toByteArray(), Base64.NO_PADDING | Base64.NO_WRAP); in encodeContentProviderAllowlist()
84 Base64.encodeToString( in encodeActivityAllowlist()
85 activityAllowlists.toByteArray(), Base64.NO_PADDING | Base64.NO_WRAP); in encodeActivityAllowlist()
94 return Base64.encodeToString( in encodeActivityAllowlist()
95 allowedActivitiesBuilder.toByteArray(), Base64.NO_PADDING | Base64.NO_WRAP); in encodeActivityAllowlist()
117 return Base64.encodeToString( in encodeBroadcastReceiverAllowlist()
[all …]
/aosp_15_r20/external/python/cpython2/Lib/email/
Dcharset.py23 BASE64 = 2 # Base64 variable
24 SHORTEST = 3 # the shorter of QP and base64, but only for headers
54 'big5': (BASE64, BASE64, None),
55 'gb2312': (BASE64, BASE64, None),
56 'euc-jp': (BASE64, None, 'iso-2022-jp'),
57 'shift_jis': (BASE64, None, 'iso-2022-jp'),
58 'iso-2022-jp': (BASE64, None, None),
59 'koi8-r': (BASE64, BASE64, None),
60 'utf-8': (SHORTEST, BASE64, 'utf-8'),
62 '8bit': (None, BASE64, 'utf-8'),
[all …]
/aosp_15_r20/external/python/cpython2/Doc/library/
Dbase64.rst1 :mod:`base64` --- RFC 3548: Base16, Base32, Base64 Data Encodings
4 .. module:: base64
5 :synopsis: RFC 3548: Base16, Base32, Base64 Data Encodings
9 pair: base64; encoding
10 single: MIME; base64 encoding
13 This standard defines the Base16, Base32, and Base64 algorithms for encoding and
22 well as strings, but only using the Base64 standard alphabet.
29 Encode a string using Base64.
34 generate URL or filesystem safe Base64 strings. The default is ``None``, for
35 which the standard Base64 alphabet is used.
[all …]
/aosp_15_r20/frameworks/libs/service_entitlement/tests/src/com/android/libraries/entitlement/eapaka/
DEapAkaChallengeTest.java23 import android.util.Base64;
39 // Base64 decoded : 0102007C17010000010500005CE6529028F1CAC804E37196A8726F81020500006B8A4586ADE
80 // Base64 encoded : EFzmUpAo8crIBONxlqhyb4EQa4pFhq3pAACzVOE8Zggz6A==
137 String encodedData = Base64.encodeToString(data, Base64.NO_WRAP).trim(); in parseEapAkaChallengeRequest_withoutRand()
147 String encodedData = Base64.encodeToString(data, Base64.NO_WRAP).trim(); in parseEapAkaChallengeRequest_withoutAutn()
157 String encodedData = Base64.encodeToString(data, Base64.NO_WRAP).trim(); in parseEapAkaChallengeRequest_withoutRandAndAutn()
167 String encodedData = Base64.encodeToString(data, Base64.NO_WRAP).trim(); in parseEapAkaChallengeRequest_withCodeResponse()
177 String encodedData = Base64.encodeToString(data, Base64.NO_WRAP).trim(); in parseEapAkaChallengeRequest_withWrongLength()
187 String encodedData = Base64.encodeToString(data, Base64.NO_WRAP).trim(); in parseEapAkaChallengeRequest_withEapType99()
197 String encodedData = Base64.encodeToString(data, Base64.NO_WRAP).trim(); in parseEapAkaChallengeRequest_withSubType99()
[all …]
/aosp_15_r20/prebuilts/clang/host/linux-x86/clang-r536225/python3/lib/python3.11/email/
Dcharset.py24 BASE64 = 2 # Base64 variable
25 SHORTEST = 3 # the shorter of QP and base64, but only for headers
57 'big5': (BASE64, BASE64, None),
58 'gb2312': (BASE64, BASE64, None),
59 'euc-jp': (BASE64, None, 'iso-2022-jp'),
60 'shift_jis': (BASE64, None, 'iso-2022-jp'),
61 'iso-2022-jp': (BASE64, None, None),
62 'koi8-r': (BASE64, BASE64, None),
63 'utf-8': (SHORTEST, BASE64, 'utf-8'),
116 quoted-printable, Charset.BASE64 for base64 encoding, Charset.SHORTEST for
[all …]
/aosp_15_r20/prebuilts/build-tools/common/py3-stdlib/email/
H A Dcharset.py24 BASE64 = 2 # Base64 variable
25 SHORTEST = 3 # the shorter of QP and base64, but only for headers
57 'big5': (BASE64, BASE64, None),
58 'gb2312': (BASE64, BASE64, None),
59 'euc-jp': (BASE64, None, 'iso-2022-jp'),
60 'shift_jis': (BASE64, None, 'iso-2022-jp'),
61 'iso-2022-jp': (BASE64, None, None),
62 'koi8-r': (BASE64, BASE64, None),
63 'utf-8': (SHORTEST, BASE64, 'utf-8'),
116 quoted-printable, Charset.BASE64 for base64 encoding, Charset.SHORTEST for
[all …]

12345678910>>...371