/packages/modules/Virtualization/libs/bssl/tests/ |
D | eckey_test.rs | 87 let digest = digester.digest(MESSAGE1)?; in ecdsa_p256_signing_and_verification_succeed() localVariable 88 assert_eq!(digest, sha256(MESSAGE1)?); in ecdsa_p256_signing_and_verification_succeed() 90 let signature = ec_key.ecdsa_sign_der(&digest)?; in ecdsa_p256_signing_and_verification_succeed() 91 ec_key.ecdsa_verify_der(&signature, &digest)?; in ecdsa_p256_signing_and_verification_succeed() 103 let digest = digester.digest(MESSAGE1)?; in ecdsa_p384_signing_and_verification_succeed() localVariable 105 let signature = ec_key.ecdsa_sign_der(&digest)?; in ecdsa_p384_signing_and_verification_succeed() 106 ec_key.ecdsa_verify_der(&signature, &digest)?; in ecdsa_p384_signing_and_verification_succeed() 115 let digest = sha256(MESSAGE1)?; in verifying_ecdsa_p256_signed_with_a_different_key_fails() localVariable 116 let signature = ec_key1.ecdsa_sign_der(&digest)?; in verifying_ecdsa_p256_signed_with_a_different_key_fails() 120 let err = ec_key2.ecdsa_verify_der(&signature, &digest).unwrap_err(); in verifying_ecdsa_p256_signed_with_a_different_key_fails() [all …]
|
/packages/modules/Connectivity/nearby/service/java/com/android/server/nearby/util/encryption/ |
D | Cryptor.java | 140 byte[] digest = new byte[0]; in computeHkdf() 144 mac.update(digest); in computeHkdf() 146 digest = mac.doFinal(); in computeHkdf() 147 if (pos + digest.length < size) { in computeHkdf() 148 System.arraycopy(digest, 0, result, pos, digest.length); in computeHkdf() 149 pos += digest.length; in computeHkdf() 152 System.arraycopy(digest, 0, result, pos, size - pos); in computeHkdf() 197 byte[] digest = new byte[0]; in computeHkdf() 199 mac.update(digest); in computeHkdf() 202 digest = mac.doFinal(); in computeHkdf() [all …]
|
/packages/modules/Connectivity/remoteauth/service/java/com/android/server/remoteauth/util/ |
D | Crypto.java | 87 byte[] digest = new byte[0]; in computeHkdf() 91 mac.update(digest); in computeHkdf() 93 digest = mac.doFinal(); in computeHkdf() 94 if (pos + digest.length < size) { in computeHkdf() 95 System.arraycopy(digest, 0, result, pos, digest.length); in computeHkdf() 96 pos += digest.length; in computeHkdf() 99 System.arraycopy(digest, 0, result, pos, size - pos); in computeHkdf()
|
/packages/modules/Virtualization/libs/apkverify/src/ |
D | v3.rs | 68 digest: LengthPrefixed<Bytes>, field 129 let digest = signed_data.find_digest_by_algorithm(algorithm_id)?; in find_digest_by_algorithm() localVariable 130 Ok(digest.digest.as_ref().to_vec().into_boxed_slice()) in find_digest_by_algorithm() 180 let digest = verified_signed_data.find_digest_by_algorithm( in verify() localVariable 183 let computed = sections.compute_digest(digest.signature_algorithm_id.unwrap())?; in verify() 187 computed == digest.digest.as_ref(), in verify() 190 hex::encode(digest.digest.as_ref()), in verify() 265 Ok(Self { signature_algorithm_id: buf.read()?, digest: buf.read()? }) in read_from_bytes()
|
D | sigutil.rs | 102 digester.digest(slice, CHUNK_HEADER_MID, chunk_size as u32)?.as_ref(), in compute_digest() 107 Ok(digester.digest(&digests_of_chunks, CHUNK_HEADER_TOP, chunk_count)?.as_ref().into()) in compute_digest() 157 fn digest(&self, data: &[u8], header: &[u8], size: u32) -> Result<DigestBytes> { in digest() method 277 let digest = apk_sections.compute_digest(SignatureAlgorithmID::DsaWithSha256).unwrap(); in test_apk_digest() localVariable 280 hex::encode(&digest[..]) in test_apk_digest()
|
/packages/modules/Virtualization/authfs/src/ |
D | main.rs | 132 digest: String, field 153 if let Some(digest) = strs[1].strip_prefix("sha256-") { in parse_remote_ro_file_option() 154 Ok(OptionRemoteRoFile { remote_fd: strs[0].parse::<i32>()?, digest: String::from(digest) }) in parse_remote_ro_file_option() 223 new_remote_verified_file_entry(service.clone(), config.remote_fd, &config.digest)?, in prepare_root_dir_entries() 264 for (path_str, digest) in &proto.digests { in prepare_root_dir_entries() 265 if digest.hash_alg != "sha256" { in prepare_root_dir_entries() 266 bail!("Unsupported hash algorithm: {}", digest.hash_alg); in prepare_root_dir_entries() 278 digest.digest.clone(), in prepare_root_dir_entries()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/dictionarypack/ |
D | MD5Calculator.java | 39 final byte[] digest = digester.digest(); in checksum() 41 for (int i = 0; i < digest.length; ++i) { in checksum() 42 s.append(String.format("%1$02x", digest[i])); in checksum()
|
/packages/apps/Dialer/java/com/android/dialer/oem/ |
D | CequintPackageUtils.java | 299 MessageDigest digest; in getSHA256() local 301 digest = MessageDigest.getInstance("SHA256", "BC"); in getSHA256() 307 digest.update(sig); in getSHA256() 308 return digest.digest(); in getSHA256()
|
/packages/modules/Virtualization/authfs/src/fsverity/metadata/ |
D | metadata.rs | 42 pub digest: Vec<u8>, field 83 let (header, digest) = { in parse_fsverity_metadata() 98 let digest = match header.descriptor.hash_algorithm { in parse_fsverity_metadata() localVariable 115 (header, digest) in parse_fsverity_metadata() 137 Ok(Box::new(FSVerityMetadata { header, digest, signature, metadata_file, merkle_tree_offset })) in parse_fsverity_metadata()
|
/packages/modules/Virtualization/compos/src/ |
D | artifact_signer.rs | 55 let digest = fsverity::measure(file.as_fd())?; in add_artifact() localVariable 56 let digest = hex::encode(digest); in add_artifact() localVariable 58 self.file_digests.push((target_path.to_owned(), digest)); in add_artifact()
|
/packages/modules/Virtualization/libs/bssl/src/ |
D | ec_key.rs | 150 pub fn ecdsa_verify_der(&self, signature: &[u8], digest: &[u8]) -> Result<()> { in ecdsa_verify_der() 159 digest.as_ptr(), in ecdsa_verify_der() 160 digest.len(), in ecdsa_verify_der() 173 pub fn ecdsa_verify_cose(&self, signature: &[u8], digest: &[u8]) -> Result<()> { in ecdsa_verify_cose() 175 self.ecdsa_verify_der(&signature, digest) in ecdsa_verify_cose() 181 pub fn ecdsa_sign_der(&self, digest: &[u8]) -> Result<Vec<u8>> { in ecdsa_sign_der() 192 digest.as_ptr(), in ecdsa_sign_der() 193 digest.len(), in ecdsa_sign_der() 211 pub fn ecdsa_sign_cose(&self, digest: &[u8]) -> Result<Vec<u8>> { in ecdsa_sign_cose() 212 let signature = self.ecdsa_sign_der(digest)?; in ecdsa_sign_cose()
|
D | lib.rs | 26 mod digest; module 42 pub use digest::Digester;
|
/packages/modules/Virtualization/service_vm/requests/src/ |
D | client_vm.rs | 120 let digest = sha256(message)?; in ecdsa_verify_cose() localVariable 121 key.ecdsa_verify_cose(signature, &digest) in ecdsa_verify_cose() 125 let digest = sha256(message)?; in ecdsa_sign_der() localVariable 126 key.ecdsa_sign_der(&digest) in ecdsa_sign_der() 195 if Digester::sha512().digest(expected_root_digest)? == vendor_partition.code_hash { in validate_vendor_partition_code_hash_if_exists() 248 if Digester::sha512().digest(&code_hash)? == actual_code_hash { in matches_any_kernel_code_hash()
|
/packages/modules/Virtualization/pvmfw/avb/src/ |
D | verify.rs | 225 let mut digest = Digest::default(); in copy_digest() localVariable 226 if descriptor.digest.len() != digest.len() { in copy_digest() 229 digest.clone_from_slice(descriptor.digest); in copy_digest() 230 Ok(digest) in copy_digest()
|
/packages/modules/IPsec/src/java/com/android/internal/net/eap/crypto/ |
D | Fips186_2Prf.java | 72 Sha1_186_2_FunctionG digest = new Sha1_186_2_FunctionG(); in getRandom() local 73 digest.update( in getRandom() 75 digest.doFinal(w_i, 0); in getRandom()
|
/packages/modules/RemoteKeyProvisioning/app/tests/unit/src/com/android/rkpdapp/unittest/ |
D | Utils.java | 271 MessageDigest digest = MessageDigest.getInstance("SHA-256"); in encodeP256PubKey() local 272 digest.update(pubX); in encodeP256PubKey() 273 byte[] kid = digest.digest(pubY); in encodeP256PubKey() 285 MessageDigest digest = MessageDigest.getInstance("SHA-256"); in encodeX25519PubKey() local 286 byte[] kid = digest.digest(publicKey); in encodeX25519PubKey()
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/avrcp/helpers/ |
D | CoverArt.java | 89 final MessageDigest digest = MessageDigest.getInstance("MD5"); in getImageHash() local 90 digest.update(/* Bitmap to input stream */ image); in getImageHash() 91 byte[] messageDigest = digest.digest(); in getImageHash()
|
/packages/modules/Virtualization/microdroid/ |
D | README.md | 158 Vendor image uses its hashtree digest for the verifying its data, generated 166 Fixed path in VM for vendor hashtree digest is written in [fstab.microdroid]. 168 digest by reading [fstab.microdroid]. 171 digest, and passes to the VM via crosvm option. The vendor hashtree digest is 176 for validating vendor hashtree digest. [Bootloader][bootloader] should append 177 vendor hashtree digest into VM reference DT based on [fstab.microdroid]. Vendor 178 hashtree digest could be appended as property into descriptors in host Android's
|
/packages/modules/OnDevicePersonalization/common/java/com/android/odp/module/common/ |
D | PackageUtils.java | 68 return messageDigest.digest(); in computeSha256DigestBytes() 91 byte[] digest = PackageUtils.computeSha256DigestBytes(signatures[0].toByteArray()); in getCertDigest() 92 return new String(HexEncoding.encode(digest)); in getCertDigest()
|
/packages/modules/Permission/tests/hostside/safetycenter/src/android/safetycenter/hostside/ |
D | SafetyCenterInteractionLoggingHostTest.kt | 230 val digest = MessageDigest.getInstance("MD5") in encodeId() constant 231 digest.update(id.toByteArray()) in encodeId() 234 return BigInteger(digest.digest()).toLong() in encodeId()
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/common/ |
D | AllowLists.java | 173 MessageDigest digest = MessageDigest.getInstance(HASH_ALGORITHM); in getAppSignatureHash() local 174 signatureHash = digest.digest(currentSignature.toByteArray()); in getAppSignatureHash()
|
/packages/modules/Wifi/service/java/com/android/server/wifi/hotspot2/ |
D | ServiceProviderVerifier.java | 209 MessageDigest digest = MessageDigest.getInstance("SHA-256"); in computeHash() local 210 return digest.digest(input); in computeHash()
|
/packages/apps/SecureElement/src/com/android/se/security/gpac/ |
D | BerTlv.java | 58 public static String toHex(byte[] digest) { in toHex() argument 60 StringBuilder sb = new StringBuilder(digest.length * 2); in toHex() 61 for (byte b : digest) { in toHex()
|
/packages/apps/Launcher3/tests/multivalentTests/src/com/android/launcher3/util/ |
D | TestUtil.java | 156 byte[] digest = MessageDigest.getInstance("SHA-256").digest(data); in setLauncherDefaultLayout() 159 digest, LAYOUT_DIGEST_LABEL, 0, LAYOUT_DIGEST_TAG); in setLauncherDefaultLayout() 171 String key = Base64.encodeToString(digest, NO_WRAP | NO_PADDING); in setLauncherDefaultLayout()
|
/packages/services/Telephony/src/com/android/phone/callcomposer/ |
D | DigestAuthUtils.java | 113 return base16(md5Digest.digest()); in computeResponse() 131 return base16(md5Digest.digest()); in generateA1Hash() 137 return base16(md5Digest.digest()); in generateA2Hash()
|