Home
last modified time | relevance | path

Searched refs:algorithm (Results 1 – 25 of 98) sorted by relevance

1234

/frameworks/base/apct-tests/perftests/core/src/android/libcore/regression/
DMessageDigestPerfTest.java99 public void time(Algorithm algorithm) throws Exception { in time() argument
102 MessageDigest digest = MessageDigest.getInstance(algorithm.toString(), mProvider); in time()
110 public void timeLargeArray(Algorithm algorithm) throws Exception { in timeLargeArray() argument
113 MessageDigest digest = MessageDigest.getInstance(algorithm.toString(), mProvider); in timeLargeArray()
121 public void timeSmallChunkOfLargeArray(Algorithm algorithm) throws Exception { in timeSmallChunkOfLargeArray() argument
124 MessageDigest digest = MessageDigest.getInstance(algorithm.toString(), mProvider); in timeSmallChunkOfLargeArray()
132 public void timeSmallByteBuffer(Algorithm algorithm) throws Exception { in timeSmallByteBuffer() argument
135 MessageDigest digest = MessageDigest.getInstance(algorithm.toString(), mProvider); in timeSmallByteBuffer()
145 public void timeSmallDirectByteBuffer(Algorithm algorithm) throws Exception { in timeSmallDirectByteBuffer() argument
148 MessageDigest digest = MessageDigest.getInstance(algorithm.toString(), mProvider); in timeSmallDirectByteBuffer()
[all …]
DKeyPairGeneratorPerfTest.java63 public void setUp(Algorithm algorithm, Implementation implementation) throws Exception { in setUp() argument
64 this.mGeneratorAlgorithm = algorithm.toString(); in setUp()
79 public void time(Algorithm algorithm, Implementation implementation) throws Exception { in time() argument
80 setUp(algorithm, implementation); in time()
DSignaturePerfTest.java91 public void setUp(Algorithm algorithm) throws Exception { in setUp() argument
92 this.mSignatureAlgorithm = algorithm.toString(); in setUp()
118 public void timeSign(Algorithm algorithm, Implementation implementation) throws Exception { in timeSign() argument
119 setUp(algorithm); in timeSign()
141 public void timeVerify(Algorithm algorithm, Implementation implementation) throws Exception { in timeVerify() argument
142 setUp(algorithm); in timeVerify()
/frameworks/base/apex/blobstore/framework/java/android/app/blob/
DBlobHandle.java62 @NonNull public final String algorithm; field in BlobHandle
92 private BlobHandle(String algorithm, byte[] digest, CharSequence label, long expiryTimeMillis, in BlobHandle() argument
94 this.algorithm = algorithm; in BlobHandle()
102 this.algorithm = in.readString(); in BlobHandle()
110 public static @NonNull BlobHandle create(@NonNull String algorithm, @NonNull byte[] digest, in create() argument
113 final BlobHandle handle = new BlobHandle(algorithm, digest, label, expiryTimeMillis, tag); in create()
194 dest.writeString(algorithm); in writeToParcel()
210 return this.algorithm.equals(other.algorithm) in equals()
219 return Objects.hash(algorithm, Arrays.hashCode(digest), label, expiryTimeMillis, tag); in hashCode()
225 fout.println("algo: " + algorithm); in dump()
[all …]
/frameworks/base/services/backup/java/com/android/server/backup/utils/
DPasswordUtils.java53 public static SecretKey buildPasswordKey(String algorithm, String pw, byte[] salt, int rounds) { in buildPasswordKey() argument
54 return buildCharArrayKey(algorithm, pw.toCharArray(), salt, rounds); in buildPasswordKey()
67 public static String buildPasswordHash(String algorithm, String pw, byte[] salt, int rounds) { in buildPasswordHash() argument
68 SecretKey key = buildPasswordKey(algorithm, pw, salt, rounds); in buildPasswordHash()
109 public static byte[] makeKeyChecksum(String algorithm, byte[] pwBytes, byte[] salt, in makeKeyChecksum() argument
116 Key checksum = buildCharArrayKey(algorithm, mkAsChar, salt, rounds); in makeKeyChecksum()
120 private static SecretKey buildCharArrayKey(String algorithm, char[] pwArray, byte[] salt, in buildCharArrayKey() argument
123 SecretKeyFactory keyFactory = SecretKeyFactory.getInstance(algorithm); in buildCharArrayKey()
/frameworks/base/core/java/android/security/net/config/
DPin.java39 public static boolean isSupportedDigestAlgorithm(String algorithm) { in isSupportedDigestAlgorithm() argument
42 return "SHA-256".equalsIgnoreCase(algorithm); in isSupportedDigestAlgorithm()
48 public static int getDigestLength(String algorithm) { in getDigestLength() argument
49 if ("SHA-256".equalsIgnoreCase(algorithm)) { in getDigestLength()
52 throw new IllegalArgumentException("Unsupported digest algorithm: " + algorithm); in getDigestLength()
DNetworkSecurityTrustManager.java145 for (String algorithm : pinAlgorithms) { in checkPins()
146 MessageDigest md = digestMap.get(algorithm); in checkPins()
149 md = MessageDigest.getInstance(algorithm); in checkPins()
153 digestMap.put(algorithm, md); in checkPins()
155 if (pinSet.pins.contains(new Pin(algorithm, md.digest(encodedSPKI)))) { in checkPins()
/frameworks/base/packages/SystemUI/src/com/android/systemui/lowlightclock/
DAmbientLightModeMonitor.kt45 private val algorithm: Optional<DebounceAlgorithm>, constant in com.android.systemui.lowlightclock.AmbientLightModeMonitor
76 if (algorithm.isEmpty) { in start()
81 algorithm.get().start(callback) in start()
93 if (algorithm.isPresent) { in stop()
94 algorithm.get().stop() in stop()
114 if (algorithm.isPresent) { in onSensorChanged()
115 algorithm.get().onUpdateLightSensorEvent(event.values[0]) in onSensorChanged()
/frameworks/base/apct-tests/perftests/core/src/android/conscrypt/conscrypt/
DTransformation.java36 Transformation(String algorithm, String mode, String padding, KeyGen keyGen) { in Transformation() argument
37 this.algorithm = algorithm; in Transformation()
43 final String algorithm; field in Transformation
49 return algorithm + "/" + mode + "/" + padding; in toFormattedString()
/frameworks/base/keystore/java/android/security/keystore2/
DAndroidKeyStoreBCWorkaroundProvider.java246 private void putMacImpl(String algorithm, String implClass) { in putMacImpl() argument
247 put("Mac." + algorithm, implClass); in putMacImpl()
248 put("Mac." + algorithm + " SupportedKeyClasses", KEYSTORE_SECRET_KEY_CLASS_NAME); in putMacImpl()
262 private void putSignatureImpl(String algorithm, String implClass) { in putSignatureImpl() argument
263 put("Signature." + algorithm, implClass); in putSignatureImpl()
264 put("Signature." + algorithm + " SupportedKeyClasses", in putSignatureImpl()
DAndroidKeyStorePrivateKey.java34 long keyId, @NonNull Authorization[] authorizations, @NonNull String algorithm, in AndroidKeyStorePrivateKey() argument
36 super(descriptor, keyId, authorizations, algorithm, securityLevel); in AndroidKeyStorePrivateKey()
DAndroidKeyStoreSecretKey.java34 @NonNull KeyMetadata metadata, @NonNull String algorithm, in AndroidKeyStoreSecretKey() argument
36 super(descriptor, metadata.key.nspace, metadata.authorizations, algorithm, securityLevel); in AndroidKeyStoreSecretKey()
DAndroidKeyStoreEdECPrivateKey.java37 @NonNull String algorithm, in AndroidKeyStoreEdECPrivateKey() argument
39 super(descriptor, keyId, authorizations, algorithm, securityLevel); in AndroidKeyStoreEdECPrivateKey()
DAndroidKeyStoreProvider.java155 private void putSecretKeyFactoryImpl(String algorithm) { in putSecretKeyFactoryImpl() argument
156 put("SecretKeyFactory." + algorithm, PACKAGE_NAME + ".AndroidKeyStoreSecretKeyFactorySpi"); in putSecretKeyFactoryImpl()
159 private void putKeyFactoryImpl(String algorithm) { in putKeyFactoryImpl() argument
160 put("KeyFactory." + algorithm, PACKAGE_NAME + ".AndroidKeyStoreKeyFactorySpi"); in putKeyFactoryImpl()
223 @NonNull KeyStoreSecurityLevel iSecurityLevel, int algorithm) in makeAndroidKeyStorePublicKeyFromKeyEntryResponse() argument
322 @NonNull KeyEntryResponse response, int algorithm, int digest) in makeAndroidKeyStoreSecretKeyFromKeyEntryResponse() argument
327 algorithm, digest); in makeAndroidKeyStoreSecretKeyFromKeyEntryResponse()
DAndroidKeyStoreXDHPrivateKey.java40 @NonNull String algorithm, in AndroidKeyStoreXDHPrivateKey() argument
42 super(descriptor, keyId, authorizations, algorithm, securityLevel); in AndroidKeyStoreXDHPrivateKey()
DAndroidKeyStorePublicKey.java40 @NonNull String algorithm, @NonNull KeyStoreSecurityLevel securityLevel) { in AndroidKeyStorePublicKey() argument
41 super(descriptor, metadata.key.nspace, metadata.authorizations, algorithm, securityLevel); in AndroidKeyStorePublicKey()
/frameworks/base/core/java/android/security/keystore/recovery/
DKeyDerivationParams.java101 private KeyDerivationParams(@KeyDerivationAlgorithm int algorithm, @NonNull byte[] salt) { in KeyDerivationParams() argument
102 this(algorithm, salt, /*memoryDifficulty=*/ -1); in KeyDerivationParams()
108 private KeyDerivationParams(@KeyDerivationAlgorithm int algorithm, @NonNull byte[] salt, in KeyDerivationParams() argument
110 mAlgorithm = algorithm; in KeyDerivationParams()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/lowlightclock/
DAmbientLightModeMonitorTest.kt45 @Mock private lateinit var algorithm: AmbientLightModeMonitor.DebounceAlgorithm variable in com.android.systemui.lowlightclock.AmbientLightModeMonitorTest
55 Optional.of(algorithm), in setUp()
86 verify(algorithm).start(eq(callback)) in shouldStartDebounceAlgorithmOnStart()
95 verify(algorithm).stop() in shouldStopDebounceAlgorithmOnStop()
101 AmbientLightModeMonitor(Optional.of(algorithm), sensorManager, Optional.empty()) in shouldNotRegisterForSensorUpdatesIfSensorNotAvailable()
/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/tv/
DTvPipKeepClearAlgorithmTest.kt52 private lateinit var algorithm: TvPipKeepClearAlgorithm variable in com.android.wm.shell.pip.tv.TvPipKeepClearAlgorithmTest
70 algorithm = TvPipKeepClearAlgorithm() in setup()
71 algorithm.setScreenSize(SCREEN_SIZE) in setup()
72 algorithm.setMovementBounds(movementBounds) in setup()
73 algorithm.pipAreaPadding = PADDING in setup()
74 algorithm.stashOffset = STASH_OFFSET in setup()
75 algorithm.setGravity(gravity) in setup()
76 algorithm.maxRestrictedDistanceFraction = 0.3 in setup()
320 (algorithm.maxRestrictedDistanceFraction * SCREEN_SIZE.width).toInt() in test_AnchorBottomRight_UnrestrictedBottomSheet_RestrictedSidebar_StashAboveBottomSheet()
346 (algorithm.maxRestrictedDistanceFraction * SCREEN_SIZE.width).toInt() in test_AnchorBottomRight_UnrestrictedBottomSheet_UnrestrictedSidebar_PushUpLeft()
[all …]
/frameworks/base/keystore/java/android/security/keystore/
DKeyProperties.java251 @NonNull @KeyAlgorithmEnum String algorithm) { in toKeymasterAsymmetricKeyAlgorithm()
252 if (KEY_ALGORITHM_EC.equalsIgnoreCase(algorithm) in toKeymasterAsymmetricKeyAlgorithm()
253 || KEY_ALGORITHM_XDH.equalsIgnoreCase(algorithm)) { in toKeymasterAsymmetricKeyAlgorithm()
255 } else if (KEY_ALGORITHM_RSA.equalsIgnoreCase(algorithm)) { in toKeymasterAsymmetricKeyAlgorithm()
258 throw new IllegalArgumentException("Unsupported key algorithm: " + algorithm); in toKeymasterAsymmetricKeyAlgorithm()
277 @NonNull @KeyAlgorithmEnum String algorithm) { in toKeymasterSecretKeyAlgorithm()
278 if (KEY_ALGORITHM_AES.equalsIgnoreCase(algorithm)) { in toKeymasterSecretKeyAlgorithm()
280 } else if (KEY_ALGORITHM_3DES.equalsIgnoreCase(algorithm)) { in toKeymasterSecretKeyAlgorithm()
282 } else if (algorithm.toUpperCase(Locale.US).startsWith("HMAC")) { in toKeymasterSecretKeyAlgorithm()
286 "Unsupported secret key algorithm: " + algorithm); in toKeymasterSecretKeyAlgorithm()
[all …]
/frameworks/av/media/ndk/fuzzer/
Dndk_drm_fuzzer.cpp265 std::string algorithm = kMacAlgorithm[mFdp.ConsumeBool()]; in invokeDrmDecryptEncryptAPI() local
270 AMediaDrm_verify(mDrm, &mSessionId, algorithm.c_str(), keyId.data(), message.data(), in invokeDrmDecryptEncryptAPI()
275 std::string algorithm = kMacAlgorithm[mFdp.ConsumeBool()]; in invokeDrmDecryptEncryptAPI() local
281 AMediaDrm_sign(mDrm, &mSessionId, algorithm.c_str(), keyId.data(), message.data(), in invokeDrmDecryptEncryptAPI()
286 std::string algorithm = kCipherAlgorithm[mFdp.ConsumeBool()]; in invokeDrmDecryptEncryptAPI() local
294 AMediaDrm_decrypt(mDrm, &mSessionId, algorithm.c_str(), keyId.data(), iv.data(), in invokeDrmDecryptEncryptAPI()
300 std::string algorithm = kCipherAlgorithm[mFdp.ConsumeBool()]; in invokeDrmDecryptEncryptAPI() local
308 AMediaDrm_encrypt(mDrm, &mSessionId, algorithm.c_str(), keyId.data(), iv.data(), in invokeDrmDecryptEncryptAPI()
/frameworks/av/drm/mediadrm/plugins/clearkey/default/include/
DDrmPlugin.h178 const Vector<uint8_t>& sessionId, const String8& algorithm) { in setCipherAlgorithm() argument
179 if (sessionId.size() == 0 || algorithm.size() == 0) { in setCipherAlgorithm()
186 const Vector<uint8_t>& sessionId, const String8& algorithm) { in setMacAlgorithm() argument
187 if (sessionId.size() == 0 || algorithm.size() == 0) { in setMacAlgorithm()
249 const String8& algorithm, in signRSA() argument
253 if (sessionId.size() == 0 || algorithm.size() == 0 || in signRSA()
/frameworks/base/core/java/android/text/
DTextDirectionHeuristics.java139 public TextDirectionHeuristicImpl(TextDirectionAlgorithm algorithm) { in TextDirectionHeuristicImpl() argument
140 mAlgorithm = algorithm; in TextDirectionHeuristicImpl()
179 private TextDirectionHeuristicInternal(TextDirectionAlgorithm algorithm, in TextDirectionHeuristicInternal() argument
181 super(algorithm); in TextDirectionHeuristicInternal()
/frameworks/av/drm/libmediadrm/
DDrmHal.cpp213 DrmStatus DrmHal::setCipherAlgorithm(Vector<uint8_t> const& sessionId, String8 const& algorithm) { in setCipherAlgorithm() argument
215 return mDrmHalAidl->setCipherAlgorithm(sessionId, algorithm); in setCipherAlgorithm()
216 return mDrmHalHidl->setCipherAlgorithm(sessionId, algorithm); in setCipherAlgorithm()
219 DrmStatus DrmHal::setMacAlgorithm(Vector<uint8_t> const& sessionId, String8 const& algorithm) { in setMacAlgorithm() argument
220 if (mDrmHalAidl->initCheck() == OK) return mDrmHalAidl->setMacAlgorithm(sessionId, algorithm); in setMacAlgorithm()
221 return mDrmHalHidl->setMacAlgorithm(sessionId, algorithm); in setMacAlgorithm()
255 DrmStatus DrmHal::signRSA(Vector<uint8_t> const& sessionId, String8 const& algorithm, in signRSA() argument
259 return mDrmHalAidl->signRSA(sessionId, algorithm, message, wrappedKey, signature); in signRSA()
260 return mDrmHalHidl->signRSA(sessionId, algorithm, message, wrappedKey, signature); in signRSA()
/frameworks/base/media/lib/signer/java/com/android/mediadrm/signer/
DMediaDrmSigner.java134 String algorithm, byte[] wrappedKey, byte[] message) { in signRSA() argument
135 return drm.signRSA(sessionId, algorithm, wrappedKey, message); in signRSA()

1234