/external/conscrypt/common/src/main/java/org/conscrypt/ |
D | DESEDESecretKeyFactory.java | 62 protected KeySpec engineGetKeySpec(SecretKey secretKey, in engineGetKeySpec() argument 64 if (secretKey == null) { in engineGetKeySpec() 69 if (!DESedeKeySpec.isParityAdjusted(secretKey.getEncoded(), 0)) { in engineGetKeySpec() 75 if (secretKey instanceof SecretKeySpec) { in engineGetKeySpec() 76 return (KeySpec) secretKey; in engineGetKeySpec() 78 return new SecretKeySpec(secretKey.getEncoded(), "DESEDE"); in engineGetKeySpec() 82 return new DESedeKeySpec(secretKey.getEncoded()); in engineGetKeySpec() 92 protected SecretKey engineTranslateKey(SecretKey secretKey) throws InvalidKeyException { in engineTranslateKey() argument 93 if (secretKey == null) { in engineTranslateKey() 96 return new SecretKeySpec(secretKey.getEncoded(), secretKey.getAlgorithm()); in engineTranslateKey()
|
D | NativeSsl.java | 179 SecretKey secretKey = pskCallbacks.getPSKKey(pskKeyManager, identityHint, identity); in clientPSKKeyRequested() local 180 byte[] secretKeyBytes = secretKey.getEncoded(); in clientPSKKeyRequested() 200 SecretKey secretKey = pskCallbacks.getPSKKey(pskKeyManager, identityHint, identity); in serverPSKKeyRequested() local 201 byte[] secretKeyBytes = secretKey.getEncoded(); in serverPSKKeyRequested()
|
/external/conscrypt/repackaged/common/src/main/java/com/android/org/conscrypt/ |
D | DESEDESecretKeyFactory.java | 64 protected KeySpec engineGetKeySpec(SecretKey secretKey, in engineGetKeySpec() argument 66 if (secretKey == null) { in engineGetKeySpec() 71 if (!DESedeKeySpec.isParityAdjusted(secretKey.getEncoded(), 0)) { in engineGetKeySpec() 77 if (secretKey instanceof SecretKeySpec) { in engineGetKeySpec() 78 return (KeySpec) secretKey; in engineGetKeySpec() 80 return new SecretKeySpec(secretKey.getEncoded(), "DESEDE"); in engineGetKeySpec() 84 return new DESedeKeySpec(secretKey.getEncoded()); in engineGetKeySpec() 94 protected SecretKey engineTranslateKey(SecretKey secretKey) throws InvalidKeyException { in engineTranslateKey() argument 95 if (secretKey == null) { in engineTranslateKey() 98 return new SecretKeySpec(secretKey.getEncoded(), secretKey.getAlgorithm()); in engineTranslateKey()
|
D | NativeSsl.java | 180 SecretKey secretKey = pskCallbacks.getPSKKey(pskKeyManager, identityHint, identity); in clientPSKKeyRequested() local 181 byte[] secretKeyBytes = secretKey.getEncoded(); in clientPSKKeyRequested() 201 SecretKey secretKey = pskCallbacks.getPSKKey(pskKeyManager, identityHint, identity); in serverPSKKeyRequested() local 202 byte[] secretKeyBytes = secretKey.getEncoded(); in serverPSKKeyRequested()
|
/external/exoplayer/tree/library/core/src/main/java/com/google/android/exoplayer2/upstream/crypto/ |
D | AesCipherDataSink.java | 32 private final byte[] secretKey; field in AesCipherDataSink 45 public AesCipherDataSink(byte[] secretKey, DataSink wrappedDataSink) { in AesCipherDataSink() argument 46 this(secretKey, wrappedDataSink, null); in AesCipherDataSink() 61 public AesCipherDataSink(byte[] secretKey, DataSink wrappedDataSink, @Nullable byte[] scratch) { in AesCipherDataSink() argument 63 this.secretKey = secretKey; in AesCipherDataSink() 73 Cipher.ENCRYPT_MODE, secretKey, nonce, dataSpec.uriPositionOffset + dataSpec.position); in open()
|
D | AesCipherDataSource.java | 37 private final byte[] secretKey; field in AesCipherDataSource 41 public AesCipherDataSource(byte[] secretKey, DataSource upstream) { in AesCipherDataSource() argument 43 this.secretKey = secretKey; in AesCipherDataSource() 57 Cipher.DECRYPT_MODE, secretKey, nonce, dataSpec.uriPositionOffset + dataSpec.position); in open()
|
D | AesFlushingCipher.java | 45 public AesFlushingCipher(int mode, byte[] secretKey, long nonce, long offset) { in AesFlushingCipher() argument 55 new SecretKeySpec(secretKey, Util.splitAtFirst(cipher.getAlgorithm(), "/")[0]), in AesFlushingCipher()
|
/external/boringssl/src/ssl/test/runner/hpke/ |
D | kem.go | 75 var secretKey [curve25519.ScalarSize]byte 76 _, err = rand.Read(secretKey[:]) 81 publicKey, err = curve25519.X25519(secretKey[:], curve25519.Basepoint) 85 return publicKey, secretKey[:], nil
|
/external/conscrypt/repackaged/common/src/test/java/com/android/org/conscrypt/ |
D | MacTest.java | 87 SecretKeySpec secretKey = new SecretKeySpec(keyBytes, "RawBytes"); in knownAnswerTest() local 93 byte[] macBytes = generateMacUsingUpdate(algorithm, secretKey, msgBytes); in knownAnswerTest() 98 macBytes = generateMacUsingFinal(algorithm, secretKey, msgBytes); in knownAnswerTest() 104 macBytes = generateMac(algorithm, secretKey, nondirectBuffer); in knownAnswerTest() 112 macBytes = generateMac(algorithm, secretKey, directBuffer); in knownAnswerTest() 118 macBytes = generateMac(algorithm, secretKey, split(nondirectBuffer)); in knownAnswerTest() 124 macBytes = generateMac(algorithm, secretKey, split(directBuffer)); in knownAnswerTest()
|
/external/conscrypt/common/src/test/java/org/conscrypt/ |
D | MacTest.java | 83 SecretKeySpec secretKey = new SecretKeySpec(keyBytes, "RawBytes"); in knownAnswerTest() local 89 byte[] macBytes = generateMacUsingUpdate(algorithm, secretKey, msgBytes); in knownAnswerTest() 94 macBytes = generateMacUsingFinal(algorithm, secretKey, msgBytes); in knownAnswerTest() 100 macBytes = generateMac(algorithm, secretKey, nondirectBuffer); in knownAnswerTest() 108 macBytes = generateMac(algorithm, secretKey, directBuffer); in knownAnswerTest() 114 macBytes = generateMac(algorithm, secretKey, split(nondirectBuffer)); in knownAnswerTest() 120 macBytes = generateMac(algorithm, secretKey, split(directBuffer)); in knownAnswerTest()
|
/external/exoplayer/tree/library/core/src/test/java/com/google/android/exoplayer2/upstream/cache/ |
D | CacheDataSourceTest2.java | 163 final String secretKey = "testKey:12345678"; in buildCacheDataSource() local 166 ? new AesCipherDataSource(Util.getUtf8Bytes(secretKey), file) : file; in buildCacheDataSource() 172 ? new AesCipherDataSink(Util.getUtf8Bytes(secretKey), cacheSink, scratch) : cacheSink; in buildCacheDataSource()
|
D | SimpleCacheTest.java | 397 private SimpleCache getEncryptedSimpleCache(byte[] secretKey) { in getEncryptedSimpleCache() argument 398 return new SimpleCache(cacheDir, new NoOpCacheEvictor(), secretKey); in getEncryptedSimpleCache()
|
/external/rappor/client/java/com/google/android/rappor/ |
D | HmacDrbg.java | 119 SecretKeySpec secretKey = new SecretKeySpec(key, "HmacSHA256"); in setKey() local 120 hmac.init(secretKey); in setKey()
|
/external/exoplayer/tree/library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/ |
D | SimpleCache.java | 154 public SimpleCache(File cacheDir, CacheEvictor evictor, @Nullable byte[] secretKey) { in SimpleCache() argument 155 this(cacheDir, evictor, secretKey, secretKey != null); in SimpleCache() 173 File cacheDir, CacheEvictor evictor, @Nullable byte[] secretKey, boolean encrypt) { in SimpleCache() argument 178 secretKey, in SimpleCache()
|
D | CachedContentIndex.java | 503 public LegacyStorage(File file, @Nullable byte[] secretKey, boolean encrypt) { in LegacyStorage() argument 506 if (secretKey != null) { in LegacyStorage() 507 Assertions.checkArgument(secretKey.length == 16); in LegacyStorage() 510 secretKeySpec = new SecretKeySpec(secretKey, "AES"); in LegacyStorage()
|
/external/ukey2/src/main/javatest/com/google/security/cryptauth/lib/securegcm/ |
D | D2DConnectionContextTest.java | 363 SecretKey secretKey = new SecretKeySpec(key, "AES"); in testSessionUniqueValues_V0() local 364 D2DConnectionContext context = new D2DConnectionContextV0(secretKey, 1); in testSessionUniqueValues_V0()
|
/external/ukey2/src/main/javatest/com/google/security/cryptauth/lib/securemessage/ |
D | PublicKeyProtoUtilTest.java | 390 private static byte[] doDhAgreement(PrivateKey secretKey, PublicKey peerKey) throws Exception { in doDhAgreement() argument 392 agreement.init(secretKey); in doDhAgreement()
|
/external/conscrypt/repackaged/common/src/test/java/com/android/org/conscrypt/javax/crypto/ |
D | CipherTest.java | 4657 SecretKey secretKey = skf.generateSecret(pbeks); in test_PBKDF2WITHHMACSHA1_SKFactory_and_PBEAESCBC_Cipher_noIV() local 4662 cipher.init(Cipher.ENCRYPT_MODE, secretKey, paramSpec); in test_PBKDF2WITHHMACSHA1_SKFactory_and_PBEAESCBC_Cipher_noIV() 4665 secretKey = skf.generateSecret(pbeks); in test_PBKDF2WITHHMACSHA1_SKFactory_and_PBEAESCBC_Cipher_noIV() 4666 cipher.init(Cipher.DECRYPT_MODE, secretKey, paramSpec); in test_PBKDF2WITHHMACSHA1_SKFactory_and_PBEAESCBC_Cipher_noIV() 4694 SecretKey secretKey = skf.generateSecret(pbeks); in test_PBKDF2WITHHMACSHA1_SKFactory_and_PBEAESCBC_Cipher_withIV() local 4697 cipher.init(Cipher.ENCRYPT_MODE, secretKey, new IvParameterSpec(iv)); in test_PBKDF2WITHHMACSHA1_SKFactory_and_PBEAESCBC_Cipher_withIV() 4700 secretKey = skf.generateSecret(pbeks); in test_PBKDF2WITHHMACSHA1_SKFactory_and_PBEAESCBC_Cipher_withIV() 4701 cipher.init(Cipher.DECRYPT_MODE, secretKey, new IvParameterSpec(iv)); in test_PBKDF2WITHHMACSHA1_SKFactory_and_PBEAESCBC_Cipher_withIV()
|
/external/conscrypt/common/src/test/java/org/conscrypt/javax/crypto/ |
D | CipherTest.java | 4661 SecretKey secretKey = skf.generateSecret(pbeks); in test_PBKDF2WITHHMACSHA1_SKFactory_and_PBEAESCBC_Cipher_noIV() local 4666 cipher.init(Cipher.ENCRYPT_MODE, secretKey, paramSpec); in test_PBKDF2WITHHMACSHA1_SKFactory_and_PBEAESCBC_Cipher_noIV() 4669 secretKey = skf.generateSecret(pbeks); in test_PBKDF2WITHHMACSHA1_SKFactory_and_PBEAESCBC_Cipher_noIV() 4670 cipher.init(Cipher.DECRYPT_MODE, secretKey, paramSpec); in test_PBKDF2WITHHMACSHA1_SKFactory_and_PBEAESCBC_Cipher_noIV() 4698 SecretKey secretKey = skf.generateSecret(pbeks); in test_PBKDF2WITHHMACSHA1_SKFactory_and_PBEAESCBC_Cipher_withIV() local 4701 cipher.init(Cipher.ENCRYPT_MODE, secretKey, new IvParameterSpec(iv)); in test_PBKDF2WITHHMACSHA1_SKFactory_and_PBEAESCBC_Cipher_withIV() 4704 secretKey = skf.generateSecret(pbeks); in test_PBKDF2WITHHMACSHA1_SKFactory_and_PBEAESCBC_Cipher_withIV() 4705 cipher.init(Cipher.DECRYPT_MODE, secretKey, new IvParameterSpec(iv)); in test_PBKDF2WITHHMACSHA1_SKFactory_and_PBEAESCBC_Cipher_withIV()
|