Home
last modified time | relevance | path

Searched refs:keyBytes (Results 1 – 25 of 37) sorted by relevance

12

/external/ukey2/src/main/java/com/google/security/cryptauth/lib/securegcm/
DKeyEncoding.java74 public static PublicKey parseUserPublicKey(byte[] keyBytes) throws InvalidKeySpecException { in parseUserPublicKey() argument
75 return parsePublicKey(keyBytes); in parseUserPublicKey()
78 public static PublicKey parseDeviceSyncGroupPublicKey(byte[] keyBytes) in parseDeviceSyncGroupPublicKey() argument
80 return parsePublicKey(keyBytes); in parseDeviceSyncGroupPublicKey()
87 public static PublicKey parseKeyAgreementPublicKey(byte[] keyBytes) in parseKeyAgreementPublicKey() argument
89 return parsePublicKey(keyBytes); in parseKeyAgreementPublicKey()
99 public static PrivateKey parseKeyAgreementPrivateKey(byte[] keyBytes, boolean isLegacy) in parseKeyAgreementPrivateKey() argument
102 return PublicKeyProtoUtil.parseDh2048PrivateKey(keyBytes); in parseKeyAgreementPrivateKey()
104 PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(keyBytes); in parseKeyAgreementPrivateKey()
112 public static PublicKey parseSigningPublicKey(byte[] keyBytes) throws InvalidKeySpecException { in parseSigningPublicKey() argument
[all …]
/external/conscrypt/repackaged/common/src/main/java/com/android/org/conscrypt/
DOpenSSLMac.java38 protected byte[] keyBytes; field in OpenSSLMac
80 keyBytes = key.getEncoded(); in engineInit()
81 if (keyBytes == null) { in engineInit()
165 if (keyBytes != null) { in resetContext()
166 NativeCrypto.HMAC_Init_ex(ctxLocal, keyBytes, evp_md); in resetContext()
257 if (keyBytes != null) { in resetContext()
258 NativeCrypto.CMAC_Init(ctxLocal, keyBytes); in resetContext()
DKeyGeneratorImpl.java73 protected byte[] doKeyGeneration(int keyBytes) { in doKeyGeneration() argument
74 byte[] keyData = new byte[keyBytes]; in doKeyGeneration()
159 protected byte[] doKeyGeneration(int keyBytes) { in doKeyGeneration() argument
168 if (keyBytes == 14) { in doKeyGeneration()
/external/conscrypt/common/src/main/java/org/conscrypt/
DOpenSSLMac.java36 protected byte[] keyBytes; field in OpenSSLMac
78 keyBytes = key.getEncoded(); in engineInit()
79 if (keyBytes == null) { in engineInit()
160 if (keyBytes != null) { in resetContext()
161 NativeCrypto.HMAC_Init_ex(ctxLocal, keyBytes, evp_md); in resetContext()
232 if (keyBytes != null) { in resetContext()
233 NativeCrypto.CMAC_Init(ctxLocal, keyBytes); in resetContext()
DKeyGeneratorImpl.java71 protected byte[] doKeyGeneration(int keyBytes) { in doKeyGeneration() argument
72 byte[] keyData = new byte[keyBytes]; in doKeyGeneration()
136 protected byte[] doKeyGeneration(int keyBytes) { in doKeyGeneration() argument
145 if (keyBytes == 14) { in doKeyGeneration()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/engines/
DRC4Engine.java113 private void setKey(byte[] keyBytes) in setKey() argument
115 workingKey = keyBytes; in setKey()
138 i2 = ((keyBytes[i1] & 0xff) + engineState[i] + i2) & 0xff; in setKey()
143 i1 = (i1+1) % keyBytes.length; in setKey()
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/crypto/engines/
DRC4Engine.java117 private void setKey(byte[] keyBytes) in setKey() argument
119 workingKey = keyBytes; in setKey()
142 i2 = ((keyBytes[i1] & 0xff) + engineState[i] + i2) & 0xff; in setKey()
147 i1 = (i1+1) % keyBytes.length; in setKey()
/external/bouncycastle/repackaged_platform/bcprov/src/main/java/com/android/internal/org/bouncycastle/crypto/engines/
DRC4Engine.java117 private void setKey(byte[] keyBytes) in setKey() argument
119 workingKey = keyBytes; in setKey()
142 i2 = ((keyBytes[i1] & 0xff) + engineState[i] + i2) & 0xff; in setKey()
147 i1 = (i1+1) % keyBytes.length; in setKey()
/external/conscrypt/common/src/test/java/org/conscrypt/
DMacTest.java80 byte[] keyBytes = decodeHex(key); in knownAnswerTest()
83 SecretKeySpec secretKey = new SecretKeySpec(keyBytes, "RawBytes"); in knownAnswerTest()
125 macBytes = generateReusingMac(algorithm, keyBytes, msgBytes); in knownAnswerTest()
285 byte[] keyBytes = decodeHex(entry[KEY_INDEX]); in anyAlgorithmParametersThrows()
286 SecretKeySpec key = new SecretKeySpec(keyBytes, "RawBytes"); in anyAlgorithmParametersThrows()
289 mac.init(key, new IvParameterSpec(keyBytes)); in anyAlgorithmParametersThrows()
350 private byte[] generateReusingMac(String algorithm, byte[] keyBytes, byte[] message) in generateReusingMac() argument
355 byte[] otherKeyBytes = new byte[keyBytes.length]; in generateReusingMac()
364 SecretKeySpec key = new SecretKeySpec(keyBytes, "RawBytes"); in generateReusingMac()
/external/conscrypt/repackaged/common/src/test/java/com/android/org/conscrypt/
DMacTest.java84 byte[] keyBytes = decodeHex(key); in knownAnswerTest()
87 SecretKeySpec secretKey = new SecretKeySpec(keyBytes, "RawBytes"); in knownAnswerTest()
129 macBytes = generateReusingMac(algorithm, keyBytes, msgBytes); in knownAnswerTest()
294 byte[] keyBytes = decodeHex(entry[KEY_INDEX]); in anyAlgorithmParametersThrows()
295 SecretKeySpec key = new SecretKeySpec(keyBytes, "RawBytes"); in anyAlgorithmParametersThrows()
298 mac.init(key, new IvParameterSpec(keyBytes)); in anyAlgorithmParametersThrows()
359 private byte[] generateReusingMac(String algorithm, byte[] keyBytes, byte[] message) in generateReusingMac() argument
364 byte[] otherKeyBytes = new byte[keyBytes.length]; in generateReusingMac()
373 SecretKeySpec key = new SecretKeySpec(keyBytes, "RawBytes"); in generateReusingMac()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/util/
DBaseAgreementSpi.java295 byte[] keyBytes = new byte[keySize / 8]; in getSharedSecretBytes()
327 kdf.generateBytes(keyBytes, 0, keyBytes.length); in getSharedSecretBytes()
331 return keyBytes; in getSharedSecretBytes()
337 byte[] keyBytes = new byte[keySize / 8]; in getSharedSecretBytes()
339 System.arraycopy(secret, 0, keyBytes, 0, keyBytes.length); in getSharedSecretBytes()
343 return keyBytes; in getSharedSecretBytes()
/external/icu/android_icu4j/src/main/java/android/icu/impl/
DUResource.java57 private Key(byte[] keyBytes, int keyOffset, int keyLength) { in Key() argument
58 bytes = keyBytes; in Key()
73 public Key setBytes(byte[] keyBytes, int keyOffset) { in setBytes() argument
74 bytes = keyBytes; in setBytes()
76 for (length = 0; keyBytes[keyOffset + length] != 0; ++length) {} in setBytes()
DICUResourceBundleReader.java135 private byte[] keyBytes; field in ICUResourceBundleReader
298 keyBytes = new byte[(keysTop - keysBottom) << 2]; in init()
302 keyBytes = new byte[localKeyLimit]; in init()
304 bytes.get(keyBytes); in init()
448 private static String makeKeyStringFromBytes(byte[] keyBytes, int keyOffset) { in makeKeyStringFromBytes() argument
451 while((b = keyBytes[keyOffset]) != 0) { in makeKeyStringFromBytes()
459 return makeKeyStringFromBytes(keyBytes, keyOffset); in getKey16String()
461 return makeKeyStringFromBytes(poolBundleReader.keyBytes, keyOffset - localKeyLimit); in getKey16String()
466 return makeKeyStringFromBytes(keyBytes, keyOffset); in getKey32String()
468 return makeKeyStringFromBytes(poolBundleReader.keyBytes, keyOffset & 0x7fffffff); in getKey32String()
[all …]
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/
DUResource.java54 private Key(byte[] keyBytes, int keyOffset, int keyLength) { in Key() argument
55 bytes = keyBytes; in Key()
70 public Key setBytes(byte[] keyBytes, int keyOffset) { in setBytes() argument
71 bytes = keyBytes; in setBytes()
73 for (length = 0; keyBytes[keyOffset + length] != 0; ++length) {} in setBytes()
DICUResourceBundleReader.java133 private byte[] keyBytes; field in ICUResourceBundleReader
296 keyBytes = new byte[(keysTop - keysBottom) << 2]; in init()
300 keyBytes = new byte[localKeyLimit]; in init()
302 bytes.get(keyBytes); in init()
446 private static String makeKeyStringFromBytes(byte[] keyBytes, int keyOffset) { in makeKeyStringFromBytes() argument
449 while((b = keyBytes[keyOffset]) != 0) { in makeKeyStringFromBytes()
457 return makeKeyStringFromBytes(keyBytes, keyOffset); in getKey16String()
459 return makeKeyStringFromBytes(poolBundleReader.keyBytes, keyOffset - localKeyLimit); in getKey16String()
464 return makeKeyStringFromBytes(keyBytes, keyOffset); in getKey32String()
466 return makeKeyStringFromBytes(poolBundleReader.keyBytes, keyOffset & 0x7fffffff); in getKey32String()
[all …]
/external/bouncycastle/repackaged_platform/bcprov/src/main/java/com/android/internal/org/bouncycastle/jcajce/provider/asymmetric/util/
DBaseAgreementSpi.java299 byte[] keyBytes = new byte[keySize / 8]; in getSharedSecretBytes()
331 kdf.generateBytes(keyBytes, 0, keyBytes.length); in getSharedSecretBytes()
335 return keyBytes; in getSharedSecretBytes()
341 byte[] keyBytes = new byte[keySize / 8]; in getSharedSecretBytes()
343 System.arraycopy(secret, 0, keyBytes, 0, keyBytes.length); in getSharedSecretBytes()
347 return keyBytes; in getSharedSecretBytes()
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/jcajce/provider/asymmetric/util/
DBaseAgreementSpi.java299 byte[] keyBytes = new byte[keySize / 8]; in getSharedSecretBytes()
331 kdf.generateBytes(keyBytes, 0, keyBytes.length); in getSharedSecretBytes()
335 return keyBytes; in getSharedSecretBytes()
341 byte[] keyBytes = new byte[keySize / 8]; in getSharedSecretBytes()
343 System.arraycopy(secret, 0, keyBytes, 0, keyBytes.length); in getSharedSecretBytes()
347 return keyBytes; in getSharedSecretBytes()
/external/oauth/core/src/main/java/net/oauth/signature/
DHMAC_SHA1.java69 byte[] keyBytes = keyString.getBytes(ENCODING); in computeSignature()
70 this.key = new SecretKeySpec(keyBytes, MAC_NAME); in computeSignature()
/external/cbor-java/src/main/java/co/nstant/in/cbor/encoder/
DMapEncoder.java86 byte[] keyBytes = byteArrayOutputStream.toByteArray(); in encode()
92 sortedMap.put(keyBytes, valueBytes); in encode()
/external/flatbuffers/java/com/google/flatbuffers/
DFlexBuffersBuilder.java190 byte[] keyBytes = key.getBytes(StandardCharsets.UTF_8); in putKey()
191 bb.put(keyBytes, 0, keyBytes.length); in putKey()
198 byte[] keyBytes = key.getBytes(StandardCharsets.UTF_8); in putKey()
199 bb.put(keyBytes, 0, keyBytes.length); in putKey()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/symmetric/util/
DPBE.java488 byte[] keyBytes = key.getEncoded(); in makePBEMacParameters()
494 for (int i = 0; i != keyBytes.length; i++) in makePBEMacParameters()
496 keyBytes[i] = 0; in makePBEMacParameters()
/external/bouncycastle/repackaged_platform/bcprov/src/main/java/com/android/internal/org/bouncycastle/jcajce/provider/symmetric/util/
DPBE.java492 byte[] keyBytes = key.getEncoded(); in makePBEMacParameters()
498 for (int i = 0; i != keyBytes.length; i++) in makePBEMacParameters()
500 keyBytes[i] = 0; in makePBEMacParameters()
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/jcajce/provider/symmetric/util/
DPBE.java492 byte[] keyBytes = key.getEncoded(); in makePBEMacParameters()
498 for (int i = 0; i != keyBytes.length; i++) in makePBEMacParameters()
500 keyBytes[i] = 0; in makePBEMacParameters()
/external/boringssl/src/util/fipstools/acvp/acvptool/subprocess/
Daead.go97 keyBytes := group.KeyBits / 8
105 if len(test.KeyHex) != keyBytes*2 {
/external/cldr/tools/java/org/unicode/cldr/icu/
DLDML2ICUBinaryWriter.java749 byte[] keyBytes; in writeKeyString()
814 keyBytes = keyList.getBytes(CHARSET8); in writeKeyString()
815 out.write(keyBytes); in writeKeyString()
816 written += keyBytes.length; in writeKeyString()

12