Home
last modified time | relevance | path

Searched refs:nonce (Results 1 – 25 of 30) sorted by relevance

12

/frameworks/base/services/backup/java/com/android/server/backup/encryption/chunking/
DEncryptedChunk.java41 public static EncryptedChunk create(ChunkHash key, byte[] nonce, byte[] encryptedBytes) { in create() argument
43 nonce.length == NONCE_LENGTH_BYTES, "Nonce does not have the correct length."); in create()
44 return new EncryptedChunk(key, nonce, encryptedBytes); in create()
51 private EncryptedChunk(ChunkHash key, byte[] nonce, byte[] encryptedBytes) { in EncryptedChunk() argument
53 mNonce = nonce; in EncryptedChunk()
63 public byte[] nonce() { in nonce() method in EncryptedChunk
DChunkEncryptor.java60 byte[] nonce = generateNonce(); in encrypt()
67 new GCMParameterSpec(GCM_TAG_LENGTH_BYTES * 8, nonce)); in encrypt()
82 return EncryptedChunk.create(/*key=*/ plaintextHash, nonce, encryptedBytes); in encrypt()
86 byte[] nonce = new byte[GCM_NONCE_LENGTH_BYTES]; in generateNonce()
87 mSecureRandom.nextBytes(nonce); in generateNonce()
88 return nonce; in generateNonce()
DLengthlessEncryptedChunkEncoder.java37 writer.writeBytes(chunk.nonce()); in writeChunkToWriter()
43 return chunk.nonce().length + chunk.encryptedBytes().length; in getEncodedLengthOfChunk()
/frameworks/base/native/android/
Dstorage_manager.cpp45 virtual void onObbResult(const android::String16& filename, const int32_t nonce,
52 : nonce(_nonce) in ObbCallback()
57 int32_t nonce; member in ObbCallback
120 void fireCallback(const char* filename, const int32_t nonce, const int32_t state) { in fireCallback()
127 if (cb->nonce == nonce) { in fireCallback()
163 cb->nonce, obbInfo); in mountObb()
169 mMountService->unmountObb(filename16, force, mObbActionListener, cb->nonce); in unmountObb()
188 void ObbActionListener::onObbResult(const android::String16& filename, const int32_t nonce, const i… in onObbResult() argument
189 mStorageManager->fireCallback(String8(filename).string(), nonce, state); in onObbResult()
/frameworks/base/obex/javax/obex/
DClientSession.java112 if (header.nonce != null) { in connect()
114 System.arraycopy(header.nonce, 0, mChallengeDigest, 0, 16); in connect()
180 if (head.nonce != null) { in get()
182 System.arraycopy(head.nonce, 0, mChallengeDigest, 0, 16); in get()
235 if (header.nonce != null) { in disconnect()
237 System.arraycopy(header.nonce, 0, mChallengeDigest, 0, 16); in disconnect()
300 if (head.nonce != null) { in put()
302 System.arraycopy(head.nonce, 0, mChallengeDigest, 0, 16); in put()
346 if (headset.nonce != null) { in setPath()
348 System.arraycopy(headset.nonce, 0, mChallengeDigest, 0, 16); in setPath()
[all …]
DHeaderSet.java238 /*package*/ byte[] nonce; field in HeaderSet
681 nonce = new byte[16]; in createAuthenticationChallenge()
686 nonce[i] = (byte)mRandom.nextInt(); in createAuthenticationChallenge()
689 mAuthChall = ObexHelper.computeAuthenticationChallenge(nonce, realm, access, userID); in createAuthenticationChallenge()
DServerSession.java374 if (reply.nonce != null) { in handleSetPathRequest()
376 System.arraycopy(reply.nonce, 0, mChallengeDigest, 0, 16); in handleSetPathRequest()
618 if (reply.nonce != null) { in handleConnectRequest()
620 System.arraycopy(reply.nonce, 0, mChallengeDigest, 0, 16); in handleConnectRequest()
DObexHelper.java1005 public static byte[] computeAuthenticationChallenge(byte[] nonce, String realm, boolean access, in computeAuthenticationChallenge() argument
1009 if (nonce.length != 16) { in computeAuthenticationChallenge()
1047 System.arraycopy(nonce, 0, authChall, 2, 16); in computeAuthenticationChallenge()
/frameworks/base/services/robotests/backup/src/com/android/server/backup/encryption/chunking/
DChunkEncryptorTest.java125 assertThat(chunk1.nonce()).isNotEqualTo(chunk2.nonce()); in encrypt_whenInvokedAgain_generatesNewNonce()
141 byte[] nonce = encryptedChunk.nonce(); in encrypt_generates12ByteNonce()
142 assertThat(nonce).hasLength(GCM_NONCE_LENGTH_BYTES); in encrypt_generates12ByteNonce()
153 new GCMParameterSpec(GCM_TAG_LENGTH_BYTES * 8, chunk.nonce())); in encrypt_decryptedResultCorrespondsToPlaintext()
DEncryptedChunkTest.java93 byte[] returnedNonce = encryptedChunk.nonce(); in testNonce_forNewlycreatedObject_returnCorrectValue()
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/
DRecoverableKeyStoreDbTest.java85 byte[] nonce = getUtf8Bytes("nonce1"); in insertKey_replacesOldKey()
89 WrappedKey wrappedKey = new WrappedKey(nonce, keyMaterial, keyMetadata, generationId); in insertKey_replacesOldKey()
93 assertArrayEquals(nonce, retrievedKey.getNonce()); in insertKey_replacesOldKey()
98 nonce = getUtf8Bytes("nonce2"); in insertKey_replacesOldKey()
102 wrappedKey = new WrappedKey(nonce, keyMaterial, keyMetadata, generationId); in insertKey_replacesOldKey()
106 assertArrayEquals(nonce, retrievedKey.getNonce()); in insertKey_replacesOldKey()
170 byte[] nonce = getUtf8Bytes("nonce"); in getKey_returnsInsertedKey()
174 WrappedKey wrappedKey = new WrappedKey(nonce, keyMaterial, keyMetadata, generationId, 120); in getKey_returnsInsertedKey()
179 assertArrayEquals(nonce, retrievedKey.getNonce()); in getKey_returnsInsertedKey()
339 byte[] nonce = getUtf8Bytes("nonce"); in setPlatformKeyGenerationId_invalidatesExistingKeysForUser()
[all …]
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/
DSecureBox.java325 private static byte[] aesGcmEncrypt(SecretKey key, byte[] nonce, byte[] plaintext, byte[] aad) in aesGcmEncrypt() argument
328 return aesGcmInternal(AesGcmOperation.ENCRYPT, key, nonce, plaintext, aad); in aesGcmEncrypt()
335 private static byte[] aesGcmDecrypt(SecretKey key, byte[] nonce, byte[] ciphertext, byte[] aad) in aesGcmDecrypt() argument
337 return aesGcmInternal(AesGcmOperation.DECRYPT, key, nonce, ciphertext, aad); in aesGcmDecrypt()
341 AesGcmOperation operation, SecretKey key, byte[] nonce, byte[] text, byte[] aad) in aesGcmInternal() argument
350 GCMParameterSpec spec = new GCMParameterSpec(GCM_TAG_LEN_BYTES * 8, nonce); in aesGcmInternal()
444 byte[] nonce = new byte[GCM_NONCE_LEN_BYTES]; in genRandomNonce()
445 new SecureRandom().nextBytes(nonce); in genRandomNonce()
446 return nonce; in genRandomNonce()
DWrappedKey.java118 public WrappedKey(byte[] nonce, byte[] keyMaterial, @Nullable byte[] keyMetadata, in WrappedKey() argument
120 this(nonce, keyMaterial, keyMetadata, platformKeyGenerationId, in WrappedKey()
136 public WrappedKey(byte[] nonce, byte[] keyMaterial, @Nullable byte[] keyMetadata, in WrappedKey() argument
138 mNonce = nonce; in WrappedKey()
/frameworks/base/libs/storage/
DIObbActionListener.cpp48 int32_t nonce = data.readInt32(); in onTransact() local
50 onObbResult(filename, nonce, state); in onTransact()
DIMountService.cpp446 const sp<IObbActionListener>& token, int32_t nonce, const sp<ObbInfo>& obbInfo) in mountObb() argument
454 data.writeInt32(nonce); in mountObb()
468 const sp<IObbActionListener>& token, const int32_t nonce) in unmountObb() argument
475 data.writeInt32(nonce); in unmountObb()
/frameworks/base/core/java/android/app/
DPropertyInvalidatedCache.java407 final long nonce = SystemProperties.getLong(name, NONCE_UNSET); in invalidateCache() local
408 if (nonce == NONCE_DISABLED) { in invalidateCache()
423 nonce, in invalidateCache()
/frameworks/base/libs/storage/include/storage/
DIMountService.h68 const int32_t nonce, const sp<ObbInfo>& obbInfo) = 0;
70 const sp<IObbActionListener>& token, const int32_t nonce) = 0;
DIObbActionListener.h32 … virtual void onObbResult(const String16& filename, const int32_t nonce, const int32_t state) = 0;
/frameworks/base/core/java/android/os/storage/
DIObbActionListener.aidl36 void onObbResult(in String filename, int nonce, int status) = 0; in onObbResult() argument
DIStorageManager.aidl61 IObbActionListener token, int nonce, in ObbInfo obbInfo) = 21; in mountObb() argument
68 void unmountObb(in String rawPath, boolean force, IObbActionListener token, int nonce) = 22; in unmountObb() argument
DStorageManager.java415 public void onObbResult(String filename, int nonce, int status) { in onObbResult() argument
418 delegate = mListeners.get(nonce); in onObbResult()
420 mListeners.remove(nonce); in onObbResult()
433 mListeners.put(delegate.nonce, delegate); in addListener()
436 return delegate.nonce; in addListener()
451 private final int nonce; field in StorageManager.ObbListenerDelegate
454 nonce = getNextNonce(); in ObbListenerDelegate()
625 final int nonce = mObbActionListener.addListener(listener); in mountObb() local
626 mStorageManager.mountObb(rawPath, canonicalPath, key, mObbActionListener, nonce, in mountObb()
670 final int nonce = mObbActionListener.addListener(listener); in unmountObb() local
[all …]
/frameworks/native/include/input/
DInputDevice.h54 uint16_t nonce; member
/frameworks/base/core/java/android/database/sqlite/
DSQLiteConnectionPool.java683 final int nonce; in waitForConnection() local
726 nonce = waiter.mNonce; in waitForConnection()
735 if (waiter.mNonce == nonce) { in waitForConnection()
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/storage/
DRecoverableKeyStoreDb.java158 byte[] nonce = cursor.getBlob( in getKey()
176 return new WrappedKey(nonce, keyMaterial, keyMetadata, generationId, recoveryStatus); in getKey()
297 byte[] nonce = cursor.getBlob( in getAllKeys()
315 keys.put(alias, new WrappedKey(nonce, keyMaterial, keyMetadata, in getAllKeys()
/frameworks/base/services/core/java/com/android/server/
DStorageManagerService.java503 IObbActionListener token, int nonce, String volId) { in ObbState() argument
508 this.nonce = nonce; in ObbState()
521 final int nonce; field in StorageManagerService.ObbState
2390 IObbActionListener token, int nonce, ObbInfo obbInfo) { in mountObb() argument
2398 callingUid, token, nonce, null); in mountObb()
2407 public void unmountObb(String rawPath, boolean force, IObbActionListener token, int nonce) { in unmountObb() argument
2419 callingUid, token, nonce, existingState.volId); in unmountObb()
3399 obbState.token.onObbResult(obbState.rawPath, obbState.nonce, in handleMessage()
3458 mObbState.token.onObbResult(mObbState.rawPath, mObbState.nonce, status); in notifyObbStateChange()

12