/external/robolectric/robolectric/src/test/java/org/robolectric/shadows/ |
D | ShadowSecureElementServiceTest.java | 5 import static java.nio.charset.StandardCharsets.UTF_8; 44 MockApplet mockApplet = new MockApplet("eSE", "aid".getBytes(UTF_8)); in oneReader_oneChannel_openTransmitTwiceClose_success() 45 mockApplet.setSelectResponse("selected".getBytes(UTF_8)); in oneReader_oneChannel_openTransmitTwiceClose_success() 46 mockApplet.addApduResponse("firstResponse".getBytes(UTF_8)); in oneReader_oneChannel_openTransmitTwiceClose_success() 47 mockApplet.addApduResponse("secondResponse".getBytes(UTF_8)); in oneReader_oneChannel_openTransmitTwiceClose_success() 63 Channel channel = session.openLogicalChannel("aid".getBytes(UTF_8)); in oneReader_oneChannel_openTransmitTwiceClose_success() 66 assertThat(channel.getSelectResponse()).isEqualTo("selected".getBytes(UTF_8)); in oneReader_oneChannel_openTransmitTwiceClose_success() 71 byte[] firstResponse = channel.transmit("firstCommand".getBytes(UTF_8)); in oneReader_oneChannel_openTransmitTwiceClose_success() 72 assertThat(firstResponse).isEqualTo("firstResponse".getBytes(UTF_8)); in oneReader_oneChannel_openTransmitTwiceClose_success() 74 byte[] secondResponse = channel.transmit("secondCommand".getBytes(UTF_8)); in oneReader_oneChannel_openTransmitTwiceClose_success() [all …]
|
/external/tink/java_src/src/test/java/com/google/crypto/tink/subtle/prf/ |
D | PrfImplTest.java | 19 import static java.nio.charset.StandardCharsets.UTF_8; 46 HashType.SHA1, "key0123456".getBytes(UTF_8), "salt".getBytes(UTF_8))); in testComputePrf_returnsExpectedSize() 48 byte[] out = prf.compute("input".getBytes(UTF_8), 12); in testComputePrf_returnsExpectedSize() 58 HashType.SHA1, "key0123456".getBytes(UTF_8), "salt".getBytes(UTF_8))); in testComputePrf_consistentPrefix() 60 byte[] out = prf.compute("input".getBytes(UTF_8), 12); in testComputePrf_consistentPrefix() 61 byte[] outLonger = prf.compute("input".getBytes(UTF_8), 16); in testComputePrf_consistentPrefix() 71 new HkdfStreamingPrf(HashType.SHA1, "key0123456".getBytes(UTF_8), "salt".getBytes(UTF_8)); in testComputePrf_identialToUnderlyingStreamingPrf() 74 byte[] prfImplOut = prf.compute("input".getBytes(UTF_8), 12); in testComputePrf_identialToUnderlyingStreamingPrf() 76 streamer.computePrf("input".getBytes(UTF_8)).read(prfStreamerOut); in testComputePrf_identialToUnderlyingStreamingPrf() 97 prf.compute("input".getBytes(UTF_8), 6); in testComputePrf_incompleteStream() [all …]
|
D | HkdfStreamingPrfTest.java | 19 import static java.nio.charset.StandardCharsets.UTF_8; 40 new HkdfStreamingPrf(HashType.SHA1, "key0123456".getBytes(UTF_8), "salt".getBytes(UTF_8)); in testComputePrf_basic() 41 InputStream input = prf.computePrf("input".getBytes(UTF_8)); in testComputePrf_basic() 49 new HkdfStreamingPrf(HashType.SHA1, "key0123456".getBytes(UTF_8), "salt".getBytes(UTF_8)); in testComputePrf_differentInputDifferentValues() 50 InputStream input = prf.computePrf("input".getBytes(UTF_8)); in testComputePrf_differentInputDifferentValues() 54 InputStream input2 = prf.computePrf("input2".getBytes(UTF_8)); in testComputePrf_differentInputDifferentValues() 63 new HkdfStreamingPrf(HashType.SHA1, "key0123456".getBytes(UTF_8), "salt".getBytes(UTF_8)); in testComputePrf_sameInputSameValue() 64 InputStream input = prf.computePrf("input".getBytes(UTF_8)); in testComputePrf_sameInputSameValue() 68 InputStream input2 = prf.computePrf("input".getBytes(UTF_8)); in testComputePrf_sameInputSameValue() 77 new HkdfStreamingPrf(HashType.SHA1, "key0123456".getBytes(UTF_8), "salt".getBytes(UTF_8)); in testComputePrf_sameInputDifferentInterfacesSameValue() [all …]
|
/external/tink-java/src/test/java/com/google/crypto/tink/subtle/prf/ |
D | PrfImplTest.java | 19 import static java.nio.charset.StandardCharsets.UTF_8; 46 HashType.SHA1, "key0123456".getBytes(UTF_8), "salt".getBytes(UTF_8))); in testComputePrf_returnsExpectedSize() 48 byte[] out = prf.compute("input".getBytes(UTF_8), 12); in testComputePrf_returnsExpectedSize() 58 HashType.SHA1, "key0123456".getBytes(UTF_8), "salt".getBytes(UTF_8))); in testComputePrf_consistentPrefix() 60 byte[] out = prf.compute("input".getBytes(UTF_8), 12); in testComputePrf_consistentPrefix() 61 byte[] outLonger = prf.compute("input".getBytes(UTF_8), 16); in testComputePrf_consistentPrefix() 71 new HkdfStreamingPrf(HashType.SHA1, "key0123456".getBytes(UTF_8), "salt".getBytes(UTF_8)); in testComputePrf_identialToUnderlyingStreamingPrf() 74 byte[] prfImplOut = prf.compute("input".getBytes(UTF_8), 12); in testComputePrf_identialToUnderlyingStreamingPrf() 76 streamer.computePrf("input".getBytes(UTF_8)).read(prfStreamerOut); in testComputePrf_identialToUnderlyingStreamingPrf() 97 prf.compute("input".getBytes(UTF_8), 6); in testComputePrf_incompleteStream() [all …]
|
D | HkdfStreamingPrfTest.java | 19 import static java.nio.charset.StandardCharsets.UTF_8; 178 new HkdfStreamingPrf(HashType.SHA1, "key0123456".getBytes(UTF_8), "salt".getBytes(UTF_8)); in testComputePrf_basic() 179 InputStream input = prf.computePrf("input".getBytes(UTF_8)); in testComputePrf_basic() 187 new HkdfStreamingPrf(HashType.SHA1, "key0123456".getBytes(UTF_8), "salt".getBytes(UTF_8)); in testComputePrf_differentInputDifferentValues() 188 InputStream input = prf.computePrf("input".getBytes(UTF_8)); in testComputePrf_differentInputDifferentValues() 192 InputStream input2 = prf.computePrf("input2".getBytes(UTF_8)); in testComputePrf_differentInputDifferentValues() 201 new HkdfStreamingPrf(HashType.SHA1, "key0123456".getBytes(UTF_8), "salt".getBytes(UTF_8)); in testComputePrf_sameInputSameValue() 202 InputStream input = prf.computePrf("input".getBytes(UTF_8)); in testComputePrf_sameInputSameValue() 206 InputStream input2 = prf.computePrf("input".getBytes(UTF_8)); in testComputePrf_sameInputSameValue() 215 new HkdfStreamingPrf(HashType.SHA1, "key0123456".getBytes(UTF_8), "salt".getBytes(UTF_8)); in testComputePrf_sameInputDifferentInterfacesSameValue() [all …]
|
/external/guava/guava-tests/test/com/google/common/hash/ |
D | Murmur3Hash32Test.java | 23 import static java.nio.charset.StandardCharsets.UTF_8; 60 assertStringHash(0, "", UTF_8); in testKnownEncodedStringInputs() 61 assertStringHash(0xcfbda5d1, "k", UTF_8); in testKnownEncodedStringInputs() 62 assertStringHash(0xa167dbf3, "hell", UTF_8); in testKnownEncodedStringInputs() 63 assertStringHash(0x248bfa47, "hello", UTF_8); in testKnownEncodedStringInputs() 64 assertStringHash(0x3d41b97c, "http://www.google.com/", UTF_8); in testKnownEncodedStringInputs() 65 assertStringHash(0x2e4ff723, "The quick brown fox jumps over the lazy dog", UTF_8); in testKnownEncodedStringInputs() 66 assertStringHash(0xb5a4be05, "ABCDefGHI\u0799", UTF_8); in testKnownEncodedStringInputs() 67 assertStringHash(0xfc5ba834, "毎月1日,毎週月曜日", UTF_8); in testKnownEncodedStringInputs() 68 assertStringHash(0x8a5c3699, "surrogate pair: \uD83D\uDCB0", UTF_8); in testKnownEncodedStringInputs() [all …]
|
D | MacHashFunctionTest.java | 20 import static java.nio.charset.StandardCharsets.UTF_8; 47 new SecretKeySpec("secret key".getBytes(UTF_8), "HmacMD5"); 49 new SecretKeySpec("secret key".getBytes(UTF_8), "HmacSHA1"); 51 new SecretKeySpec("secret key".getBytes(UTF_8), "HmacSHA256"); 53 new SecretKeySpec("secret key".getBytes(UTF_8), "HmacSHA512"); 98 mac.update("hello".getBytes(UTF_8)); in testMultipleUpdates() 99 mac.update("world".getBytes(UTF_8)); in testMultipleUpdates() 105 .putString("hello", UTF_8) in testMultipleUpdates() 106 .putString("world", UTF_8) in testMultipleUpdates() 113 mac.update("hello".getBytes(UTF_8)); in testMultipleUpdatesDoFinal() [all …]
|
/external/guava/android/guava-tests/test/com/google/common/hash/ |
D | Murmur3Hash32Test.java | 23 import static java.nio.charset.StandardCharsets.UTF_8; 60 assertStringHash(0, "", UTF_8); in testKnownEncodedStringInputs() 61 assertStringHash(0xcfbda5d1, "k", UTF_8); in testKnownEncodedStringInputs() 62 assertStringHash(0xa167dbf3, "hell", UTF_8); in testKnownEncodedStringInputs() 63 assertStringHash(0x248bfa47, "hello", UTF_8); in testKnownEncodedStringInputs() 64 assertStringHash(0x3d41b97c, "http://www.google.com/", UTF_8); in testKnownEncodedStringInputs() 65 assertStringHash(0x2e4ff723, "The quick brown fox jumps over the lazy dog", UTF_8); in testKnownEncodedStringInputs() 66 assertStringHash(0xb5a4be05, "ABCDefGHI\u0799", UTF_8); in testKnownEncodedStringInputs() 67 assertStringHash(0xfc5ba834, "毎月1日,毎週月曜日", UTF_8); in testKnownEncodedStringInputs() 68 assertStringHash(0x8a5c3699, "surrogate pair: \uD83D\uDCB0", UTF_8); in testKnownEncodedStringInputs() [all …]
|
D | MacHashFunctionTest.java | 20 import static java.nio.charset.StandardCharsets.UTF_8; 47 new SecretKeySpec("secret key".getBytes(UTF_8), "HmacMD5"); 49 new SecretKeySpec("secret key".getBytes(UTF_8), "HmacSHA1"); 51 new SecretKeySpec("secret key".getBytes(UTF_8), "HmacSHA256"); 53 new SecretKeySpec("secret key".getBytes(UTF_8), "HmacSHA512"); 98 mac.update("hello".getBytes(UTF_8)); in testMultipleUpdates() 99 mac.update("world".getBytes(UTF_8)); in testMultipleUpdates() 105 .putString("hello", UTF_8) in testMultipleUpdates() 106 .putString("world", UTF_8) in testMultipleUpdates() 113 mac.update("hello".getBytes(UTF_8)); in testMultipleUpdatesDoFinal() [all …]
|
/external/apache-commons-io/src/test/java/org/apache/commons/io/input/ |
D | XmlStreamReaderTest.java | 62 private static final String UTF_8 = StandardCharsets.UTF_8.name(); field in XmlStreamReaderTest 172 … try (final InputStream stream = new ByteArrayInputStream(hdr.getBytes(StandardCharsets.UTF_8))) { in parseCharset() 271 …mReader reader = new XmlStreamReader(new URL("https://www.apache.org/").openConnection(), UTF_8)) { in testConstructorURLConnectionInput() argument 297 …InputStream is = new ByteArrayInputStream(ENCODING_ATTRIBUTE_XML.getBytes(StandardCharsets.UTF_8)); in testEncodingAttributeXML() 299 assertEquals(xmlReader.getEncoding(), UTF_8); in testEncodingAttributeXML() local 301 …InputStream is = new ByteArrayInputStream(ENCODING_ATTRIBUTE_XML.getBytes(StandardCharsets.UTF_8)); in testEncodingAttributeXML() 309 assertEquals(xmlReader.getEncoding(), UTF_8); in testEncodingAttributeXML() local 319 testHttpValid("application/xml", "UTF-8-bom", UTF_8, null); in testHttp() 320 testHttpValid("application/xml", "UTF-8-bom", UTF_8, UTF_8); in testHttp() 321 testHttpValid("application/xml;charset=UTF-8", "UTF-8-bom", UTF_8, null); in testHttp() [all …]
|
/external/google-java-format/core/src/test/java/com/google/googlejavaformat/java/ |
D | MainTest.java | 21 import static java.nio.charset.StandardCharsets.UTF_8; 102 Files.write(path, "class Test {}\n".getBytes(UTF_8)); in preserveOriginalFile() 110 new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out, UTF_8)), true), in preserveOriginalFile() 111 new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.err, UTF_8)), true), in preserveOriginalFile() 132 String err = new String(ByteStreams.toByteArray(process.getErrorStream()), UTF_8); in testMain() 172 InputStream in = new ByteArrayInputStream(joiner.join(input).getBytes(UTF_8)); in javadoc() 177 new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.err, UTF_8)), true), in javadoc() 208 InputStream in = new ByteArrayInputStream(joiner.join(input).getBytes(UTF_8)); in imports() 213 new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.err, UTF_8)), true), in imports() 249 InputStream in = new ByteArrayInputStream(joiner.join(input).getBytes(UTF_8)); in optimizeImportsDoesNotLeaveEmptyLines() [all …]
|
/external/aws-crt-java/src/main/java/software/amazon/awssdk/crt/io/ |
D | Uri.java | 29 …pendEncodingUriPath(encoded.getBytes(StandardCharsets.UTF_8), path.getBytes(StandardCharsets.UTF_8… in appendEncodingUriPath() 30 StandardCharsets.UTF_8); in appendEncodingUriPath() 56 return new String(appendEncodingUriParam(encoded.getBytes(StandardCharsets.UTF_8), in appendEncodingUriParam() 57 param.getBytes(StandardCharsets.UTF_8)), StandardCharsets.UTF_8); in appendEncodingUriParam() 84 …appendDecodingUri(base.getBytes(StandardCharsets.UTF_8), encoded.getBytes(StandardCharsets.UTF_8)), in appendDecodingUri() 85 StandardCharsets.UTF_8); in appendDecodingUri()
|
/external/tink/java_src/src/test/java/com/google/crypto/tink/integration/gcpkms/ |
D | GcpKmsIntegrationTest.java | 20 import static java.nio.charset.StandardCharsets.UTF_8; 74 byte[] plaintext = "plaintext".getBytes(UTF_8); in kmsAead_encryptDecrypt() 75 byte[] associatedData = "associatedData".getBytes(UTF_8); in kmsAead_encryptDecrypt() 80 byte[] invalid = "invalid".getBytes(UTF_8); in kmsAead_encryptDecrypt() 81 byte[] empty = "".getBytes(UTF_8); in kmsAead_encryptDecrypt() 95 byte[] plaintext = "plaintext".getBytes(UTF_8); in kmsAeadEncryptAndDecryptWithoutAssociatedData_success() 96 byte[] empty = "".getBytes(UTF_8); in kmsAeadEncryptAndDecryptWithoutAssociatedData_success() 117 byte[] plaintext = "plaintext".getBytes(UTF_8); in kmsAeadDecryptWithDifferentKeyUri_fails() 118 byte[] associatedData = "associatedData".getBytes(UTF_8); in kmsAeadDecryptWithDifferentKeyUri_fails() 141 byte[] plaintext = "plaintext".getBytes(UTF_8); in kmsEnvelopeAead_encryptDecrypt() [all …]
|
D | FakeCloudKmsTest.java | 19 import static java.nio.charset.StandardCharsets.UTF_8; 52 byte[] plaintext = "plaintext".getBytes(UTF_8); in testEncryptDecryptWithValidKeyId_success() 53 byte[] associatedData = "associatedData".getBytes(UTF_8); in testEncryptDecryptWithValidKeyId_success() 78 byte[] plaintext = "".getBytes(UTF_8); in encryptEmptyData_decryptReturnsNull() 79 byte[] associatedData = "associatedData".getBytes(UTF_8); in encryptEmptyData_decryptReturnsNull() 104 byte[] plaintext = "plaintext".getBytes(UTF_8); in testEncryptWithUnknownKeyId_executeFails() 105 byte[] associatedData = "associatedData".getBytes(UTF_8); in testEncryptWithUnknownKeyId_executeFails() 125 byte[] plaintext = "plaintext".getBytes(UTF_8); in testEncryptWithInvalidKeyId_encryptFails() 126 byte[] associatedData = "associatedData".getBytes(UTF_8); in testEncryptWithInvalidKeyId_encryptFails() 145 byte[] plaintext = "plaintext".getBytes(UTF_8); in testDecryptWithInvalidKeyId_decryptFails() [all …]
|
/external/mobile-data-download/javatests/com/google/android/libraries/mobiledatadownload/file/openers/ |
D | StreamMutationOpenerTest.java | 20 import static java.nio.charset.StandardCharsets.UTF_8; 71 out.write(content.getBytes(UTF_8)); in okIfFileDoesNotExist() 77 String actual = new String(storage.open(uri, opener), UTF_8); in okIfFileDoesNotExist() 94 out.write(content.getBytes(UTF_8)); in willFailToOverwriteDirectory() 111 String read = new String(ByteStreams.toByteArray(in), UTF_8); in canMutate() 112 out.write(Ascii.toUpperCase(read).getBytes(UTF_8)); in canMutate() 118 String actual = new String(storage.open(uri, opener), UTF_8); in canMutate() 133 String read = new String(ByteStreams.toByteArray(in), UTF_8); in canMutate_butNotCommit() 134 out.write(Ascii.toUpperCase(read).getBytes(UTF_8)); in canMutate_butNotCommit() 140 String actual = new String(storage.open(uri, opener), UTF_8); in canMutate_butNotCommit() [all …]
|
/external/ktfmt/core/src/test/java/com/facebook/ktfmt/cli/ |
D | MainTest.kt | 24 import java.nio.charset.StandardCharsets.UTF_8 63 fooBar.writeText("hi", UTF_8) in expandArgsToFileNames - single file arg is used as is() 78 foo.writeText("", UTF_8) in expandArgsToFileNames - single arg which is a directory is resolved to its recursively contained kt files() 80 bar.writeText("", UTF_8) in expandArgsToFileNames - single arg which is a directory is resolved to its recursively contained kt files() 89 foo1.writeText("", UTF_8) in expandArgsToFileNames - multiple directory args are resolved to their recursively contained kt files() 91 bar1.writeText("", UTF_8) in expandArgsToFileNames - multiple directory args are resolved to their recursively contained kt files() 96 foo2.writeText("", UTF_8) in expandArgsToFileNames - multiple directory args are resolved to their recursively contained kt files() 98 bar2.writeText("", UTF_8) in expandArgsToFileNames - multiple directory args are resolved to their recursively contained kt files() 110 assertThat(out.toString(UTF_8)).isEqualTo(expected) in Using '-' as the filename formats an InputStream() 141 fooBar.writeText("fun f1 ( ", UTF_8) in Parsing errors are reported (file)() [all …]
|
/external/tink/java_src/src/test/java/com/google/crypto/tink/keyderivation/ |
D | KeyDerivationTest.java | 20 import static java.nio.charset.StandardCharsets.UTF_8; 69 KeysetHandle derivedHandle = deriver.deriveKeyset("salt".getBytes(UTF_8)); in createTemplateAndDeriveAesGcmKeyset_success() 73 byte[] plaintext = "plaintext".getBytes(UTF_8); in createTemplateAndDeriveAesGcmKeyset_success() 74 byte[] associatedData = "associatedData".getBytes(UTF_8); in createTemplateAndDeriveAesGcmKeyset_success() 107 KeysetHandle derivedHandle = deriver.deriveKeyset("salt".getBytes(UTF_8)); in readKeysetAndDeriveAesGcmKeyset_success() 110 byte[] plaintext = "plaintext".getBytes(UTF_8); in readKeysetAndDeriveAesGcmKeyset_success() 111 byte[] associatedData = "associatedData".getBytes(UTF_8); in readKeysetAndDeriveAesGcmKeyset_success() 172 KeysetHandle derivedHandle = deriver.deriveKeyset("salt".getBytes(UTF_8)); in multipleKeysReadKeysetAndDeriveAesGcmKeyset_success() 176 byte[] plaintext = "plaintext".getBytes(UTF_8); in multipleKeysReadKeysetAndDeriveAesGcmKeyset_success() 177 byte[] associatedData = "associatedData".getBytes(UTF_8); in multipleKeysReadKeysetAndDeriveAesGcmKeyset_success() [all …]
|
D | KeysetDeriverWrapperTest.java | 20 import static java.nio.charset.StandardCharsets.UTF_8; 97 new DummyDeriver("wrap_single_key".getBytes(UTF_8)), in test_wrapSingle_works() 111 Keyset keyset = CleartextKeysetHandle.getKeyset(wrapped.deriveKeyset("salt".getBytes(UTF_8))); in test_wrapSingle_works() 117 Hex.encode("wrap_single_key".getBytes(UTF_8)) in test_wrapSingle_works() 119 + Hex.encode("salt".getBytes(UTF_8))); in test_wrapSingle_works() 155 .addPrimitive(new DummyDeriver("k0".getBytes(UTF_8)), key0) in test_wrapMultiple_works() 156 .addPrimaryPrimitive(new DummyDeriver("k1".getBytes(UTF_8)), key1) in test_wrapMultiple_works() 157 .addPrimitive(new DummyDeriver("k2".getBytes(UTF_8)), key2) in test_wrapMultiple_works() 161 Keyset keyset = CleartextKeysetHandle.getKeyset(wrapped.deriveKeyset("salt".getBytes(UTF_8))); in test_wrapMultiple_works() 165 .isEqualTo(Hex.encode("k0".getBytes(UTF_8)) + ":" + Hex.encode("salt".getBytes(UTF_8))); in test_wrapMultiple_works() [all …]
|
/external/tink/java_src/src/test/java/com/google/crypto/tink/hybrid/ |
D | HybridDecryptWrapperTest.java | 20 import static java.nio.charset.StandardCharsets.UTF_8; 71 "some salt".getBytes(UTF_8)); in setUp() 78 "other salt".getBytes(UTF_8)); in setUp() 124 byte[] plaintext = "plaintext".getBytes(UTF_8); in decryptRaw_worksWithCiphertextFromRawEncrypter() 125 byte[] contextInfo = "contextInfo".getBytes(UTF_8); in decryptRaw_worksWithCiphertextFromRawEncrypter() 140 () -> wrappedDecrypter.decrypt(ciphertext, "invalid".getBytes(UTF_8))); in decryptRaw_worksWithCiphertextFromRawEncrypter() 143 () -> wrappedDecrypter.decrypt("invalid".getBytes(UTF_8), contextInfo)); in decryptRaw_worksWithCiphertextFromRawEncrypter() 146 () -> wrappedDecrypter.decrypt("".getBytes(UTF_8), contextInfo)); in decryptRaw_worksWithCiphertextFromRawEncrypter() 166 byte[] plaintext = "plaintext".getBytes(UTF_8); in decryptTink_worksWithRawCiphertextWithTinkPrefix() 167 byte[] contextInfo = "contextInfo".getBytes(UTF_8); in decryptTink_worksWithRawCiphertextWithTinkPrefix() [all …]
|
/external/tink-java/src/test/java/com/google/crypto/tink/keyderivation/ |
D | KeyDerivationTest.java | 20 import static java.nio.charset.StandardCharsets.UTF_8; 70 KeysetHandle derivedHandle = deriver.deriveKeyset("salt".getBytes(UTF_8)); in createTemplateAndDeriveAesGcmKeyset_success() 74 byte[] plaintext = "plaintext".getBytes(UTF_8); in createTemplateAndDeriveAesGcmKeyset_success() 75 byte[] associatedData = "associatedData".getBytes(UTF_8); in createTemplateAndDeriveAesGcmKeyset_success() 108 KeysetHandle derivedHandle = deriver.deriveKeyset("salt".getBytes(UTF_8)); in readKeysetAndDeriveAesGcmKeyset_success() 111 byte[] plaintext = "plaintext".getBytes(UTF_8); in readKeysetAndDeriveAesGcmKeyset_success() 112 byte[] associatedData = "associatedData".getBytes(UTF_8); in readKeysetAndDeriveAesGcmKeyset_success() 173 KeysetHandle derivedHandle = deriver.deriveKeyset("salt".getBytes(UTF_8)); in multipleKeysReadKeysetAndDeriveAesGcmKeyset_success() 177 byte[] plaintext = "plaintext".getBytes(UTF_8); in multipleKeysReadKeysetAndDeriveAesGcmKeyset_success() 178 byte[] associatedData = "associatedData".getBytes(UTF_8); in multipleKeysReadKeysetAndDeriveAesGcmKeyset_success() [all …]
|
/external/guava/android/guava-tests/test/com/google/common/io/ |
D | SourceSinkFactories.java | 24 import static java.nio.charset.StandardCharsets.UTF_8; 77 return new FileByteSinkFactory(initialString.getBytes(UTF_8)); in appendingFileByteSinkFactory() 106 return factory.createSource(new String(data, UTF_8)).asByteSource(UTF_8); in asByteSourceFactory() 111 return factory.getExpected(new String(data, UTF_8)).getBytes(UTF_8); in asByteSourceFactory() 126 return factory.createSource(string.getBytes(UTF_8)).asCharSource(UTF_8); 131 return new String(factory.getExpected(data.getBytes(UTF_8)), UTF_8); 146 return factory.createSink().asCharSink(UTF_8); 151 return new String(factory.getSinkContents(), UTF_8); 161 return new String(factoryExpectedForNothing, UTF_8) + checkNotNull(data); 359 Writer writer = new OutputStreamWriter(new FileOutputStream(file), UTF_8); [all …]
|
/external/tink-java/src/test/java/com/google/crypto/tink/ |
D | UtilTest.java | 21 import static java.nio.charset.StandardCharsets.UTF_8; 49 TestUtil.createHmacKeyData(keyValue.getBytes(UTF_8), 16), in testValidateKey_success() 80 TestUtil.createHmacKeyData(keyValue.getBytes(UTF_8), 16), in testValidateKey_unknownPrefix_fails() 92 TestUtil.createHmacKeyData(keyValue.getBytes(UTF_8), 16), in testValidateKey_unknownStatus_fails() 105 TestUtil.createHmacKeyData(keyValue.getBytes(UTF_8), 16), in testValidateKeyset_shouldWork() 131 TestUtil.createHmacKeyData(keyValue.getBytes(UTF_8), 16), in testValidateKeyset_multiplePrimaryKeys_shouldFail() 136 TestUtil.createHmacKeyData(keyValue.getBytes(UTF_8), 16), in testValidateKeyset_multiplePrimaryKeys_shouldFail() 152 TestUtil.createHmacKeyData(keyValue.getBytes(UTF_8), 16), in testValidateKeyset_primaryKeyIsDisabled_shouldFail() 157 TestUtil.createHmacKeyData(keyValue.getBytes(UTF_8), 16), in testValidateKeyset_primaryKeyIsDisabled_shouldFail() 173 TestUtil.createHmacKeyData(keyValue.getBytes(UTF_8), 16), in testValidateKeyset_noEnabledKey_shouldFail() [all …]
|
/external/guava/guava-tests/test/com/google/common/io/ |
D | SourceSinkFactories.java | 24 import static java.nio.charset.StandardCharsets.UTF_8; 80 return new FileByteSinkFactory(initialString.getBytes(UTF_8)); in appendingFileByteSinkFactory() 117 return new PathByteSinkFactory(initialString.getBytes(UTF_8)); in appendingPathByteSinkFactory() 141 return factory.createSource(new String(data, UTF_8)).asByteSource(UTF_8); in asByteSourceFactory() 146 return factory.getExpected(new String(data, UTF_8)).getBytes(UTF_8); in asByteSourceFactory() 161 return factory.createSource(string.getBytes(UTF_8)).asCharSource(UTF_8); 166 return new String(factory.getExpected(data.getBytes(UTF_8)), UTF_8); 181 return factory.createSink().asCharSink(UTF_8); 186 return new String(factory.getSinkContents(), UTF_8); 196 return new String(factoryExpectedForNothing, UTF_8) + checkNotNull(data); [all …]
|
/external/aws-sdk-java-v2/core/auth-crt/src/test/java/software/amazon/awssdk/authcrt/signer/internal/checksum/ |
D | CrtBasedChecksumTest.java | 67 crc32c.update("abc".getBytes(StandardCharsets.UTF_8)); in validateEncodedBase64ForCrc32C() 75 crc32.update("abc".getBytes(StandardCharsets.UTF_8)); in validateEncodedBase64ForCrc32() 83 crc32.update("ab".getBytes(StandardCharsets.UTF_8)); in validateMarkAndResetForCrc32() 85 crc32.update("xyz".getBytes(StandardCharsets.UTF_8)); in validateMarkAndResetForCrc32() 87 crc32.update("c".getBytes(StandardCharsets.UTF_8)); in validateMarkAndResetForCrc32() 95 crc32c.update("ab".getBytes(StandardCharsets.UTF_8)); in validateMarkAndResetForCrc32C() 97 crc32c.update("xyz".getBytes(StandardCharsets.UTF_8)); in validateMarkAndResetForCrc32C() 99 crc32c.update("c".getBytes(StandardCharsets.UTF_8)); in validateMarkAndResetForCrc32C() 107 crc32c.update("Hello ".getBytes(StandardCharsets.UTF_8)); in validateMarkForCrc32C() 109 crc32c.update("world".getBytes(StandardCharsets.UTF_8)); in validateMarkForCrc32C() [all …]
|
/external/tink-java/src/test/java/com/google/crypto/tink/subtle/ |
D | RewindableReadableByteChannelTest.java | 20 import static java.nio.charset.StandardCharsets.UTF_8; 43 ReadableByteChannel baseChannel = new ByteBufferChannel("some data".getBytes(UTF_8)); in testOpenClose() 55 byte[] inputData = "The quick brown fox jumps over the lazy dog.".getBytes(UTF_8); in testSingleRead() 68 byte[] inputData = "The quick brown fox jumps over the lazy dog.".getBytes(UTF_8); in testReadTwice() 86 byte[] inputData = "The quick brown fox jumps over the lazy dog.".getBytes(UTF_8); in testReadAfterEof() 100 byte[] inputData = "The quick brown fox jumps over the lazy dog.".getBytes(UTF_8); in testReadRewindShorterReads() 120 byte[] inputData = "The quick brown fox jumps over the lazy dog.".getBytes(UTF_8); in testReadRewindLongerRead() 137 byte[] inputData = "The quick brown fox jumps over the lazy dog.".getBytes(UTF_8); in testReadRewindReadEverything() 154 byte[] inputData = "The quick brown fox jumps over the lazy dog.".getBytes(UTF_8); in testReadTwiceRewindRead() 175 byte[] inputData = "The quick brown fox jumps over the lazy dog.".getBytes(UTF_8); in testRewindAfterCloseFails() [all …]
|