Home
last modified time | relevance | path

Searched refs:plainText (Results 1 – 25 of 32) sorted by relevance

12

/packages/modules/AdServices/adservices/tests/unittest/service-core/src/jni/java/com/android/adservices/ohttp/
DObliviousHttpGatewayTest.java57 String plainText = testVector.plainText; in decrypt_canDecryptPayloadsEncryptedByOhttpClient() local
58 byte[] plainTextBytes = plainText.getBytes(StandardCharsets.US_ASCII); in decrypt_canDecryptPayloadsEncryptedByOhttpClient()
71 testVector.plainText, new String(decrypted, StandardCharsets.UTF_8)); in decrypt_canDecryptPayloadsEncryptedByOhttpClient()
83 String plainText = testVector.plainText; in decrypt_canDecryptPayloadsEncryptedByOhttpClient_withServerAuctionMediaTypeChange() local
84 byte[] plainTextBytes = plainText.getBytes(StandardCharsets.US_ASCII); in decrypt_canDecryptPayloadsEncryptedByOhttpClient_withServerAuctionMediaTypeChange()
97 testVector.plainText, new String(decrypted, StandardCharsets.UTF_8)); in decrypt_canDecryptPayloadsEncryptedByOhttpClient_withServerAuctionMediaTypeChange()
108 String plainText = testVector.plainText; in encrypt_canBeDecryptedByOhttpClient() local
109 byte[] plainTextBytes = plainText.getBytes(StandardCharsets.US_ASCII); in encrypt_canBeDecryptedByOhttpClient()
140 String plainText = testVector.plainText; in encrypt_canBeDecryptedByOhttpClient_withServerAuctionMediaTypeChange() local
141 byte[] plainTextBytes = plainText.getBytes(StandardCharsets.US_ASCII); in encrypt_canBeDecryptedByOhttpClient_withServerAuctionMediaTypeChange()
[all …]
DObliviousHttpClientTest.java108 String plainText = testVector.plainText; in createObliviousHttpRequest_testAllTestVectors() local
109 byte[] plainTextBytes = plainText.getBytes(StandardCharsets.US_ASCII); in createObliviousHttpRequest_testAllTestVectors()
138 String plainText = testVector.plainText; in createObliviousHttpRequest_testAllTestVectors_withServerAuctionMediaTypeChange() local
139 byte[] plainTextBytes = plainText.getBytes(StandardCharsets.US_ASCII); in createObliviousHttpRequest_testAllTestVectors_withServerAuctionMediaTypeChange()
168 String plainText = testVector.plainText; in decryptObliviousHttpResponse_testAllTestVectors() local
169 byte[] plainTextBytes = plainText.getBytes(StandardCharsets.US_ASCII); in decryptObliviousHttpResponse_testAllTestVectors()
194 String plainText = testVector.plainText; in decryptObliviousHttpResponse_testAllTestVectors_withServerAuctionMediaTypeChange() local
195 byte[] plainTextBytes = plainText.getBytes(StandardCharsets.US_ASCII); in decryptObliviousHttpResponse_testAllTestVectors_withServerAuctionMediaTypeChange()
224 String plainText = "doesnt matter"; in decryptObliviousHttpResponse_withAuctionResult() local
225 byte[] plainTextBytes = plainText.getBytes(StandardCharsets.US_ASCII); in decryptObliviousHttpResponse_withAuctionResult()
[all …]
DOhttpJniWrapperTest.java132 String plainText = "test request 1"; in hpkeEncrypt_returnsCorrectResponse() local
133 byte[] plainTextBytes = plainText.getBytes(StandardCharsets.US_ASCII); in hpkeEncrypt_returnsCorrectResponse()
170 String plainText = "test request 1"; in hpkeEncrypt_returnsCorrectResponse_withServerAuctionMediaTypeChange() local
171 byte[] plainTextBytes = plainText.getBytes(StandardCharsets.US_ASCII); in hpkeEncrypt_returnsCorrectResponse_withServerAuctionMediaTypeChange()
487 byte[] plainText = in aeadSeal_returnsCorrectResponse()
495 plainText); in aeadSeal_returnsCorrectResponse()
514 byte[] plainText = in aeadOpen_returnsCorrectResponse()
523 BaseEncoding.base16().lowerCase().encode(plainText)); in aeadOpen_returnsCorrectResponse()
537 String plainText = "test request 1"; in hpkeSetupRecipient_missingkey_throwsError() local
538 byte[] plainTextBytes = plainText.getBytes(StandardCharsets.US_ASCII); in hpkeSetupRecipient_missingkey_throwsError()
[all …]
DObliviousHttpRequestTest.java64 String plainText = "something"; in serialize_serializesCorrectly() local
70 plainText.getBytes(StandardCharsets.US_ASCII), in serialize_serializesCorrectly()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/topics/
DHpkeEncrypterTest.java61 byte[] plainText = generateTopicsPlainText(topic); in testEncryption_success()
65 mHpkeEncrypter.encrypt(DECODED_PUBLIC_KEY, plainText, EMPTY_CONTEXT_INFO); in testEncryption_success()
87 byte[] plainText = generateTopicsPlainText(topic); in testEncryption_invalidKeyLength_returnsEmpty()
93 plainText, in testEncryption_invalidKeyLength_returnsEmpty()
115 byte[] plainText = generateTopicsPlainText(topic); in testEncryption_nullPublicKey_throwsException()
119 () -> mHpkeEncrypter.encrypt(/* publicKey */ null, plainText, EMPTY_CONTEXT_INFO)); in testEncryption_nullPublicKey_throwsException()
125 byte[] plainText = generateTopicsPlainText(topic); in testEncryption_nullContextInfo_throwsException()
131 DECODED_PUBLIC_KEY, plainText, /* contextInfo */ null)); in testEncryption_nullContextInfo_throwsException()
/packages/modules/AdServices/adservices/service-core/jni/java/com/android/adservices/ohttp/
DObliviousHttpRequest.java30 abstract byte[] plainText(); in plainText() method in ObliviousHttpRequest
40 byte[] plainText, byte[] cipherText, ObliviousHttpRequestContext requestContext) { in create() argument
41 return new AutoValue_ObliviousHttpRequest(plainText, cipherText, requestContext); in create()
46 return Arrays.copyOf(plainText(), plainText().length); in getPlainText()
DObliviousHttpClient.java74 byte[] plainText, boolean hasMediaTypeChanged) throws IOException { in createObliviousHttpRequest() argument
76 return createObliviousHttpRequest(plainText, seed, hasMediaTypeChanged); in createObliviousHttpRequest()
87 byte[] plainText, byte[] seed, boolean hasMediaTypeChanged) throws IOException { in createObliviousHttpRequest() argument
106 plainText, in createObliviousHttpRequest()
115 return ObliviousHttpRequest.create(plainText, encryptResponse.cipherText(), requestContext); in createObliviousHttpRequest()
DOhttpJniWrapper.java157 @Nullable byte[] plainText, in hpkeEncrypt() argument
169 byte[] cipherText = hpkeCtxSeal(hpkeContextNativeRef, plainText, aad); in hpkeEncrypt()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/adselection/encryption/
DKAnonObliviousHttpEncryptorImplTest.java96 String plainText = "test request 1"; in test_encryptBytes_success() local
97 byte[] plainTextBytes = plainText.getBytes(StandardCharsets.US_ASCII); in test_encryptBytes_success()
124 String plainText = "test request 1"; in test_encryptBytes_success_withServerAuctionMediaTypeNoChange() local
125 byte[] plainTextBytes = plainText.getBytes(StandardCharsets.US_ASCII); in test_encryptBytes_success_withServerAuctionMediaTypeNoChange()
178 String plainText = "test request 1"; in test_decryptBytes_success() local
179 byte[] plainTextBytes = plainText.getBytes(StandardCharsets.US_ASCII); in test_decryptBytes_success()
205 String plainText = "test request 1"; in test_decryptBytes_success_withServerAuctionMediaTypeNoChange() local
206 byte[] plainTextBytes = plainText.getBytes(StandardCharsets.US_ASCII); in test_decryptBytes_success_withServerAuctionMediaTypeNoChange()
DObliviousHttpEncryptorImplTest.java110 String plainText = "test request 1"; in test_encryptBytes_success() local
111 byte[] plainTextBytes = plainText.getBytes(StandardCharsets.US_ASCII); in test_encryptBytes_success()
138 String plainText = "test request 1"; in test_encryptBytes_success_withServerAuctionMediaTypeChange() local
139 byte[] plainTextBytes = plainText.getBytes(StandardCharsets.US_ASCII); in test_encryptBytes_success_withServerAuctionMediaTypeChange()
186 String plainText = "test request 1"; in test_decryptBytes_success() local
187 byte[] plainTextBytes = plainText.getBytes(StandardCharsets.US_ASCII); in test_decryptBytes_success()
214 String plainText = "test request 1"; in test_decryptBytes_success_withServerAuctionMediaTypeChange() local
215 byte[] plainTextBytes = plainText.getBytes(StandardCharsets.US_ASCII); in test_decryptBytes_success_withServerAuctionMediaTypeChange()
/packages/modules/OnDevicePersonalization/federatedcompute/jni/cpp/
Dhpke_jni.cc30 jbyteArray publicKey, jbyteArray plainText, jbyteArray associatedData) { in Java_com_android_federatedcompute_services_encryption_jni_HpkeJni_encrypt() argument
32 if (publicKey == NULL || plainText == NULL || associatedData == NULL) { in Java_com_android_federatedcompute_services_encryption_jni_HpkeJni_encrypt()
68 payload.resize(encapsulated_shared_secret_len + env->GetArrayLength(plainText) + in Java_com_android_federatedcompute_services_encryption_jni_HpkeJni_encrypt()
74 jbyte* plain_text = env->GetByteArrayElements(plainText, 0); in Java_com_android_federatedcompute_services_encryption_jni_HpkeJni_encrypt()
82 /* in_len=*/ env->GetArrayLength(plainText), in Java_com_android_federatedcompute_services_encryption_jni_HpkeJni_encrypt()
85 env->ReleaseByteArrayElements(plainText, plain_text, JNI_ABORT); in Java_com_android_federatedcompute_services_encryption_jni_HpkeJni_encrypt()
89 env->ReleaseByteArrayElements(plainText, plain_text, JNI_ABORT); in Java_com_android_federatedcompute_services_encryption_jni_HpkeJni_encrypt()
/packages/modules/AdServices/adservices/service-core/jni/cpp/
Dhpke_jni.cpp30 jbyteArray publicKey, jbyteArray plainText, jbyteArray associatedData) { in Java_com_android_adservices_HpkeJni_encrypt() argument
32 if (publicKey == NULL || plainText == NULL || associatedData == NULL) { in Java_com_android_adservices_HpkeJni_encrypt()
68 payload.resize(encapsulated_shared_secret_len + env->GetArrayLength(plainText) + in Java_com_android_adservices_HpkeJni_encrypt()
74 jbyte* plain_text = env->GetByteArrayElements(plainText, 0); in Java_com_android_adservices_HpkeJni_encrypt()
82 /* in_len=*/ env->GetArrayLength(plainText), in Java_com_android_adservices_HpkeJni_encrypt()
85 env->ReleaseByteArrayElements(plainText, plain_text, JNI_ABORT); in Java_com_android_adservices_HpkeJni_encrypt()
89 env->ReleaseByteArrayElements(plainText, plain_text, JNI_ABORT); in Java_com_android_adservices_HpkeJni_encrypt()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/adselection/
DObliviousHttpEncryptorWithSeedImplTest.java106 String plainText = "test request 1"; in test_encryptBytes_success() local
107 byte[] plainTextBytes = plainText.getBytes(StandardCharsets.US_ASCII); in test_encryptBytes_success()
146 String plainText = "test request 1"; in test_encryptBytes_success_withServerAuctionMediaTypeChange() local
147 byte[] plainTextBytes = plainText.getBytes(StandardCharsets.US_ASCII); in test_encryptBytes_success_withServerAuctionMediaTypeChange()
199 String plainText = "test request 1"; in test_decryptBytes_success() local
200 byte[] plainTextBytes = plainText.getBytes(StandardCharsets.US_ASCII); in test_decryptBytes_success()
239 String plainText = "test request 1"; in test_decryptBytes_success_withServerAuctionMediaTypeChange() local
240 byte[] plainTextBytes = plainText.getBytes(StandardCharsets.US_ASCII); in test_decryptBytes_success_withServerAuctionMediaTypeChange()
/packages/modules/AdServices/adservices/libraries/cobalt/java/com/android/cobalt/testing/crypto/
DHpkeEncryptFactory.java29 public byte[] encrypt(byte[] publicKey, byte[] plainText, byte[] contextInfo) { in noOpHpkeEncrypt()
30 return plainText; in noOpHpkeEncrypt()
41 public byte[] encrypt(byte[] publicKey, byte[] plainText, byte[] contextInfo) {
/packages/modules/AdServices/adservices/tests/unittest/fixtures/java/com/android/adservices/ohttp/
DObliviousHttpTestFixtures.java159 public String plainText; field in ObliviousHttpTestFixtures.OhttpTestVector
169 String plainText, in OhttpTestVector() argument
177 this.plainText = plainText; in OhttpTestVector()
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/adselection/encryption/
DKAnonObliviousHttpEncryptorImpl.java63 byte[] plainText, in encryptBytes() argument
70 .transform(key -> createAndSerializeRequest(key, plainText), mLightweightExecutor); in encryptBytes()
89 private byte[] createAndSerializeRequest(ObliviousHttpKeyConfig config, byte[] plainText) { in createAndSerializeRequest() argument
97 plainText, in createAndSerializeRequest()
DObliviousHttpEncryptorImpl.java68 byte[] plainText, in encryptBytes() argument
79 createAndSerializeRequest(key, plainText, contextId); in encryptBytes()
106 ObliviousHttpKeyConfig config, byte[] plainText, long contextId) { in createAndSerializeRequest() argument
115 plainText, in createAndSerializeRequest()
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/topics/
DHpkeEncrypter.java50 @NonNull byte[] publicKey, @NonNull byte[] plainText, @NonNull byte[] contextInfo) { in encrypt() argument
52 Objects.requireNonNull(plainText); in encrypt()
59 return HpkeJni.encrypt(publicKey, plainText, contextInfo); in encrypt()
DEncrypter.java29 byte[] encrypt(byte[] publicKey, byte[] plainText, byte[] contextInfo); in encrypt() argument
/packages/modules/AdServices/adservices/tests/unittest/fixtures/java/android/adservices/adselection/
DObliviousHttpEncryptorWithSeedImpl.java72 byte[] plainText, in encryptBytes() argument
82 key -> createAndSerializeRequestWithSeed(key, plainText, contextId), in encryptBytes()
107 ObliviousHttpKeyConfig config, byte[] plainText, long contextId) { in createAndSerializeRequestWithSeed() argument
115 plainText, in createAndSerializeRequestWithSeed()
/packages/modules/OnDevicePersonalization/federatedcompute/src/com/android/federatedcompute/services/encryption/
DHpkeJniEncrypter.java28 public byte[] encrypt(byte[] publicKey, byte[] plainText, byte[] associatedData) { in encrypt() argument
29 return HpkeJni.encrypt(publicKey, plainText, associatedData); in encrypt()
DEncrypter.java30 byte[] encrypt(byte[] publicKey, byte[] plainText, byte[] associatedData); in encrypt() argument
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/cobalt/
DHpkeEncryptImpl.java40 @NonNull byte[] publicKey, @NonNull byte[] plainText, @NonNull byte[] contextInfo) { in encrypt() argument
41 return HpkeJni.encrypt(publicKey, plainText, contextInfo); in encrypt()
/packages/modules/AdServices/adservices/libraries/cobalt/java/com/android/cobalt/crypto/
DHpkeEncrypter.java168 byte[] plainText = message.toByteArray(); in encrypt()
169 if (plainText.length == 0) { in encrypt()
DHpkeEncrypt.java33 @NonNull byte[] publicKey, @NonNull byte[] plainText, @NonNull byte[] contextInfo); in encrypt() argument

12