Home
last modified time | relevance | path

Searched refs:hexStringToByteArray (Results 1 – 25 of 43) sorted by relevance

12

/frameworks/opt/net/ike/tests/iketests/src/java/com/android/ike/ikev2/message/
DIkeAuthPayloadTest.java85 byte[] inputPacket = TestUtils.hexStringToByteArray(PSK_AUTH_PAYLOAD_HEX_STRING); in testDecodeIkeAuthPayload()
92 TestUtils.hexStringToByteArray(PSK_AUTH_PAYLOAD_SIGNATURE_HEX_STRING); in testDecodeIkeAuthPayload()
98 byte[] inputPacket = TestUtils.hexStringToByteArray(PSK_AUTH_PAYLOAD_HEX_STRING); in testDecodeIkeAuthPayloadWithUnsupportedMethod()
111 byte[] skpBytes = TestUtils.hexStringToByteArray(PSK_SKP_HEX_STRING); in testSignWithPrf()
112 byte[] idBytes = TestUtils.hexStringToByteArray(PSK_ID_PAYLOAD_HEX_STRING); in testSignWithPrf()
116 TestUtils.hexStringToByteArray(PSK_SIGNED_OCTETS_APPENDIX_HEX_STRING); in testSignWithPrf()
123 byte[] skpBytes = TestUtils.hexStringToByteArray(PSK_SKP_HEX_STRING); in testGetSignedOctets()
124 byte[] idBytes = TestUtils.hexStringToByteArray(PSK_ID_PAYLOAD_HEX_STRING); in testGetSignedOctets()
125 byte[] ikeInitRequest = TestUtils.hexStringToByteArray(PSK_IKE_INIT_REQUEST_HEX_STRING); in testGetSignedOctets()
126 byte[] nonceResp = TestUtils.hexStringToByteArray(PSK_NONCE_RESP_HEX_STRING); in testGetSignedOctets()
[all …]
DIkeEncryptedPayloadBodyTest.java85 TestUtils.hexStringToByteArray(IKE_AUTH_INIT_REQUEST_UNENCRYPTED_DATA); in setUp()
91 mDataToAuthenticate = TestUtils.hexStringToByteArray(hexStringToAuthenticate); in setUp()
93 TestUtils.hexStringToByteArray(IKE_AUTH_INIT_REQUEST_ENCRYPT_PADDED_DATA); in setUp()
95 TestUtils.hexStringToByteArray( in setUp()
102 mChecksum = TestUtils.hexStringToByteArray(IKE_AUTH_INIT_REQUEST_CHECKSUM); in setUp()
103 mIv = TestUtils.hexStringToByteArray(IKE_AUTH_INIT_REQUEST_IV); in setUp()
104 mPadding = TestUtils.hexStringToByteArray(IKE_AUTH_INIT_REQUEST_PADDING); in setUp()
107 byte[] encryptKeyBytes = TestUtils.hexStringToByteArray(ENCR_KEY_FROM_INIT_TO_RESP); in setUp()
112 byte[] integrityKeyBytes = TestUtils.hexStringToByteArray(INTE_KEY_FROM_INIT_TO_RESP); in setUp()
213 TestUtils.hexStringToByteArray( in testBuildAndEncodeOutboundIkeEncryptedPayloadBody()
DIkeAuthPskPayloadTest.java67 private static final byte[] PSK = TestUtils.hexStringToByteArray(PSK_HEX_STRING);
69 TestUtils.hexStringToByteArray(PSK_IKE_INIT_REQUEST_HEX_STRING);
70 private static final byte[] NONCE = TestUtils.hexStringToByteArray(PSK_NONCE_RESP_HEX_STRING);
72 TestUtils.hexStringToByteArray(PSK_ID_INITIATOR_PAYLOAD_HEX_STRING);
73 private static final byte[] PRF_KEY = TestUtils.hexStringToByteArray(PSK_SKP_HEX_STRING);
75 TestUtils.hexStringToByteArray(PSK_AUTH_PAYLOAD_SIGNATURE_HEX_STRING);
90 byte[] expectedPayload = TestUtils.hexStringToByteArray(PSK_AUTH_PAYLOAD_HEX_STRING); in testBuildOutboundIkeAuthPskPayload()
100 byte[] payloadBody = TestUtils.hexStringToByteArray(PSK_AUTH_PAYLOAD_BODY_HEX_STRING); in buildPskPayload()
DIkeSaPayloadTest.java175 byte[] inputPacket = TestUtils.hexStringToByteArray(ATTRIBUTE_RAW_PACKET); in testDecodeAttribute()
191 byte[] expectedBytes = TestUtils.hexStringToByteArray(ATTRIBUTE_RAW_PACKET); in testEncodeAttribute()
198 byte[] inputPacket = TestUtils.hexStringToByteArray(ENCR_TRANSFORM_RAW_PACKET); in testDecodeEncryptionTransform()
214 byte[] inputPacket = TestUtils.hexStringToByteArray(ENCR_TRANSFORM_RAW_PACKET); in testDecodeEncryptionTransformWithInvalidKeyLength()
236 byte[] expectedBytes = TestUtils.hexStringToByteArray(ENCR_TRANSFORM_RAW_PACKET); in testEncodeEncryptionTransform()
261 byte[] inputPacket = TestUtils.hexStringToByteArray(PRF_TRANSFORM_RAW_PACKET); in testDecodePrfTransform()
280 byte[] expectedBytes = TestUtils.hexStringToByteArray(PRF_TRANSFORM_RAW_PACKET); in testEncodePrfTransform()
296 byte[] inputPacket = TestUtils.hexStringToByteArray(INTEG_TRANSFORM_RAW_PACKET); in testDecodeIntegrityTransform()
312 byte[] inputPacket = TestUtils.hexStringToByteArray(INTEG_TRANSFORM_RAW_PACKET); in testDecodeIntegrityTransformWithUnrecognizedAttribute()
331 byte[] expectedBytes = TestUtils.hexStringToByteArray(INTEG_TRANSFORM_RAW_PACKET); in testEncodeIntegrityTransform()
[all …]
DIkeDeletePayloadTest.java44 ByteBuffer.wrap(TestUtils.hexStringToByteArray(DELETE_IKE_PAYLOAD_HEX_STRING)); in testDecodeDeleteIkePayload()
63 ByteBuffer.wrap(TestUtils.hexStringToByteArray(DELETE_CHILD_PAYLOAD_HEX_STRING)); in testDecodeDeleteChildPayload()
77 byte[] childSpiBytes = TestUtils.hexStringToByteArray(CHILD_SPI); in testDecodeDeleteChildPayload()
86 byte[] deletePayloadBytes = TestUtils.hexStringToByteArray(DELETE_IKE_PAYLOAD_HEX_STRING); in testDecodeWithInvalidProtocol()
101 byte[] deletePayloadBytes = TestUtils.hexStringToByteArray(DELETE_IKE_PAYLOAD_HEX_STRING); in testDecodeWithInvalidSpiSize()
116 byte[] deletePayloadBytes = TestUtils.hexStringToByteArray(DELETE_IKE_PAYLOAD_HEX_STRING); in testDecodeWithInvalidNumSpi()
131 byte[] deletePayloadBytes = TestUtils.hexStringToByteArray(DELETE_IKE_PAYLOAD_HEX_STRING); in testDecodeWithInvalidNumSpiAndSpiSize()
DIkeKePayloadTest.java98 byte[] inputPacket = TestUtils.hexStringToByteArray(KE_PAYLOAD_RAW_PACKET); in testDecodeIkeKePayload()
105 byte[] keyExchangeData = TestUtils.hexStringToByteArray(KEY_EXCHANGE_DATA_RAW_PACKET); in testDecodeIkeKePayload()
117 byte[] inputPacket = TestUtils.hexStringToByteArray(badKeyPayloadPacket); in testDecodeIkeKePayloadWithInvalidKeData()
128 byte[] inputPacket = TestUtils.hexStringToByteArray(KE_PAYLOAD_RAW_PACKET); in testEncodeIkeKePayload()
135 TestUtils.hexStringToByteArray(KE_PAYLOAD_GENERIC_HEADER + KE_PAYLOAD_RAW_PACKET); in testEncodeIkeKePayload()
172 byte[] remotePublicKey = TestUtils.hexStringToByteArray(PUBLIC_KEY_REMOTE); in testGetSharedkey()
178 byte[] expectedSharedKeyBytes = TestUtils.hexStringToByteArray(EXPECTED_SHARED_KEY); in testGetSharedkey()
DIkeMessageTest.java119 byte[] inputPacket = TestUtils.hexStringToByteArray(IKE_SA_INIT_RAW_PACKET); in testDecodeIkeMessage()
130 byte[] inputPacket = TestUtils.hexStringToByteArray(IKE_SA_INIT_RAW_PACKET); in testDecodeMessageWithUnsupportedUncriticalPayload()
143 byte[] inputPacket = TestUtils.hexStringToByteArray(IKE_SA_INIT_RAW_PACKET); in testThrowUnsupportedCriticalPayloadException()
161 byte[] inputPacket = TestUtils.hexStringToByteArray(IKE_SA_INIT_RAW_PACKET); in testDecodeMessageWithTooShortPayloadLength()
175 byte[] inputPacket = TestUtils.hexStringToByteArray(IKE_SA_INIT_RAW_PACKET); in testDecodeMessageWithTooLongPayloadLength()
188 byte[] inputPacket = TestUtils.hexStringToByteArray(IKE_SA_INIT_RAW_PACKET + "0000"); in testDecodeMessageWithExpectedBytesInTheEnd()
208 byte[] inputPacket = TestUtils.hexStringToByteArray(IKE_SA_INIT_RAW_PACKET); in testAttachEncodedHeader()
209 byte[] ikeBodyBytes = TestUtils.hexStringToByteArray(IKE_SA_INIT_BODY_RAW_PACKET); in testAttachEncodedHeader()
DIkeHeaderTest.java76 byte[] inputPacket = TestUtils.hexStringToByteArray(IKE_SA_INIT_RAW_PACKET); in testDecodeIkeHeader()
98 byte[] inputPacket = TestUtils.hexStringToByteArray(IKE_SA_INIT_RAW_PACKET); in testDecodeIkeHeaderWithInvalidMajorVersion()
116 byte[] inputPacket = TestUtils.hexStringToByteArray(IKE_SA_INIT_RAW_PACKET); in testDecodeIkeHeaderWithInvalidExchangeType()
129 byte[] inputPacket = TestUtils.hexStringToByteArray(IKE_SA_INIT_RAW_PACKET); in testDecodeIkeHeaderWithInvalidPacketLength()
142 byte[] inputPacket = TestUtils.hexStringToByteArray(IKE_SA_INIT_RAW_PACKET); in testEncodeIkeHeader()
148 byte[] expectedPacket = TestUtils.hexStringToByteArray(IKE_HEADER_HEX_STRING); in testEncodeIkeHeader()
DIkeNotifyPayloadTest.java58 byte[] inputPacket = TestUtils.hexStringToByteArray(NOTIFY_PAYLOAD_BODY_RAW_PACKET); in testDecodeNotifyPayload()
69 byte[] inputPacket = TestUtils.hexStringToByteArray(NOTIFY_PAYLOAD_BODY_RAW_PACKET); in testDecodeNotifyPayloadThrowException()
90 TestUtils.hexStringToByteArray(NAT_DETECTION_SOURCE_IP_DATA_HEX_STRING); in testGenerateNatDetectionData()
96 byte[] inputPacket = TestUtils.hexStringToByteArray(NOTIFY_PAYLOAD_BODY_RAW_PACKET); in testEncodeNotifyPayload()
103 TestUtils.hexStringToByteArray( in testEncodeNotifyPayload()
DIkeIdPayloadTest.java52 TestUtils.hexStringToByteArray(IPV4_ADDR_ID_PAYLOAD_RESPONDER_BODY_HEX_STRING); in testDecodeIpv4AddrIdPayload()
65 TestUtils.hexStringToByteArray(IPV6_ADDR_ID_PAYLOAD_RESPONDER_BODY_HEX_STRING); in testDecodeIpv6AddrIdPayload()
78 TestUtils.hexStringToByteArray(IPV4_ADDR_ID_PAYLOAD_RESPONDER_BODY_HEX_STRING); in testDecodeUnsupportedIdType()
97 TestUtils.hexStringToByteArray(IPV4_ADDR_ID_PAYLOAD_RESPONDER_HEX_STRING); in testConstructAndEncodeIpv4AddrIdPayload()
110 TestUtils.hexStringToByteArray(IPV6_ADDR_ID_PAYLOAD_RESPONDER_HEX_STRING); in testConstructAndEncodeIpv6AddrIdPayload()
DIkeCertX509CertPayloadTest.java98 byte[] inputPacket = TestUtils.hexStringToByteArray(CERT_PAYLOAD_BODY_HEX_STRING); in testDecodeX509Certificate()
108 byte[] inputPacket = TestUtils.hexStringToByteArray(CERT_PAYLOAD_BODY_HEX_STRING + "ffff"); in testDecodeX509CertificateWithUnexpectedTrailing()
118 byte[] inputPacket = TestUtils.hexStringToByteArray(CERT_PAYLOAD_BODY_HEX_STRING); in testDecodeGetNoX509Certificate()
129 byte[] inputPacket = TestUtils.hexStringToByteArray(CERT_PAYLOAD_BODY_HEX_STRING); in testDecodeInvalidX509Certificate()
DIkeSkPayloadTest.java72 byte[] decryptKeyBytes = TestUtils.hexStringToByteArray(ENCR_KEY_FROM_INIT_TO_RESP); in setUp()
77 byte[] integrityKeyBytes = TestUtils.hexStringToByteArray(INTE_KEY_FROM_INIT_TO_RESP); in setUp()
84 byte[] message = TestUtils.hexStringToByteArray(IKE_AUTH_INIT_REQUEST_HEX_STRING); in testEncode()
DIkeNoncePayloadTest.java37 byte[] inputPacket = TestUtils.hexStringToByteArray(NONCE_DATA_RAW_HEX_STRING); in testEncode()
44 TestUtils.hexStringToByteArray(NONCE_PAYLOAD_RAW_HEX_STRING); in testEncode()
DTestUtils.java28 public static byte[] hexStringToByteArray(String hexString) throws IllegalArgumentException { in hexStringToByteArray() method in TestUtils
46 byte[] payloadBytes = hexStringToByteArray(payloadHexString); in hexStringToIkePayload()
DIkeAuthDigitalSignPayloadTest.java41 TestUtils.hexStringToByteArray(AUTH_PAYLOAD_BODY_GENERIC_DIGITAL_SIGN_HEX_STRING); in testDecodeGenericDigitalSignPayload()
/frameworks/opt/net/ike/tests/iketests/src/java/com/android/ike/ikev2/
DSaRecordTest.java90 byte[] nonceInit = TestUtils.hexStringToByteArray(IKE_NONCE_INIT_HEX_STRING); in testCalculateSKeySeed()
91 byte[] nonceResp = TestUtils.hexStringToByteArray(IKE_NONCE_RESP_HEX_STRING); in testCalculateSKeySeed()
92 byte[] sharedDhKey = TestUtils.hexStringToByteArray(IKE_SHARED_DH_KEY_HEX_STRING); in testCalculateSKeySeed()
98 byte[] expectedSKeySeed = TestUtils.hexStringToByteArray(IKE_SKEYSEED_HEX_STRING); in testCalculateSKeySeed()
104 byte[] prfKey = TestUtils.hexStringToByteArray(IKE_SKEYSEED_HEX_STRING); in testSignWithPrfPlusForIke()
106 TestUtils.hexStringToByteArray( in testSignWithPrfPlusForIke()
120 byte[] expectedKeyMat = TestUtils.hexStringToByteArray(IKE_KEY_MAT); in testSignWithPrfPlusForIke()
126 byte[] prfKey = TestUtils.hexStringToByteArray(IKE_SK_D_HEX_STRING); in testSignWithPrfPlusForFirstChild()
128 TestUtils.hexStringToByteArray( in testSignWithPrfPlusForFirstChild()
135 byte[] expectedKeyMat = TestUtils.hexStringToByteArray(FIRST_CHILD_KEY_MAT); in testSignWithPrfPlusForFirstChild()
DIkeTrafficSelectorTest.java62 TestUtils.hexStringToByteArray(TS_IPV4_ONE_HEX_STRING + TS_IPV4_TWO_HEX_STRING); in testDecodeIkeTrafficSelectors()
94 byte[] tsBytes = TestUtils.hexStringToByteArray(TS_IPV4_ONE_HEX_STRING); in testDecodeIkeTrafficSelectorWithInvalidTsType()
108 byte[] tsBytes = TestUtils.hexStringToByteArray(TS_IPV4_ONE_HEX_STRING); in testDecodeIkeTrafficSelectorWithInvalidIpProtocol()
122 byte[] tsBytes = TestUtils.hexStringToByteArray(TS_IPV4_ONE_HEX_STRING + "FFFF"); in testDecodeIkeTrafficSelectorWithExpectedTrailing()
135 byte[] tsBytes = TestUtils.hexStringToByteArray(TS_IPV4_ONE_HEX_STRING); in testDecodeIkeTrafficSelectorWithInvalidTsLength()
152 byte[] tsBytes = TestUtils.hexStringToByteArray(TX_IPV4_INVALID_PORT_RANGE_HEX_STRING); in testDecodeIkeTrafficSelectorWithInvalidPortRange()
165 byte[] tsBytes = TestUtils.hexStringToByteArray(TX_IPV4_INVALID_ADDRESS_RANGE_HEX_STRING); in testDecodeIkeTrafficSelectorWithInvalidAddressRange()
DIkeSocketTest.java115 ByteBuffer localSpiBuffer = ByteBuffer.wrap(TestUtils.hexStringToByteArray(LOCAL_SPI)); in setUp()
117 ByteBuffer remoteSpiBuffer = ByteBuffer.wrap(TestUtils.hexStringToByteArray(REMOTE_SPI)); in setUp()
243 TestUtils.hexStringToByteArray( in testHandlePacket()
248 byte[] expectedIkePacketBytes = TestUtils.hexStringToByteArray(IKE_REQ_MESSAGE_HEX_STRING); in testHandlePacket()
261 TestUtils.hexStringToByteArray( in testHandleEspPacket()
275 TestUtils.hexStringToByteArray( in testHandlePacketWithMalformedHeader()
DChildSessionStateMachineTest.java107 byte[] spiInBytes = TestUtils.hexStringToByteArray(CURRENT_CHILD_SA_SPI_IN); in makeDummyChildSaRecord()
110 byte[] spiOutBytes = TestUtils.hexStringToByteArray(CURRENT_CHILD_SA_SPI_OUT); in makeDummyChildSaRecord()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DGsmSmsTest.java33 SmsMessage sms = SmsMessage.createFromPdu(HexDump.hexStringToByteArray(pdu)); in testAddressing()
40 sms = SmsMessage.createFromPdu(HexDump.hexStringToByteArray(pdu)); in testAddressing()
46 sms = SmsMessage.createFromPdu(HexDump.hexStringToByteArray(pdu)); in testAddressing()
53 SmsMessage sms = SmsMessage.createFromPdu(HexDump.hexStringToByteArray(pdu)); in testRecipientAddress()
66 SmsMessage sms = SmsMessage.createFromPdu(HexDump.hexStringToByteArray(pdu)); in testUdh()
82 sms = SmsMessage.createFromPdu(HexDump.hexStringToByteArray(pdu)); in testUdh()
100 SmsMessage sms = SmsMessage.createFromPdu(HexDump.hexStringToByteArray(pdu)); in testUcs2()
115 SmsMessage sms = SmsMessage.createFromPdu(HexDump.hexStringToByteArray(pdu)); in testMultipart()
124 sms = SmsMessage.createFromPdu(HexDump.hexStringToByteArray(pdu)); in testMultipart()
134 SmsMessage sms = SmsMessage.createFromPdu(HexDump.hexStringToByteArray(pdu)); in testCPHSVoiceMail()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/net/watchlist/
DHarmfulDigestsTests.java41 private static final byte[] TEST_DIGEST_1 = HexDump.hexStringToByteArray("AAAAAA");
42 private static final byte[] TEST_DIGEST_2 = HexDump.hexStringToByteArray("BBBBBB");
43 private static final byte[] TEST_DIGEST_3 = HexDump.hexStringToByteArray("AAAABB");
44 private static final byte[] TEST_DIGEST_4 = HexDump.hexStringToByteArray("BBBBAA");
DWatchlistConfigTests.java65 private static final byte[] TEST_NEW_CC_DOMAIN_SHA256 = HexDump.hexStringToByteArray(
67 private static final byte[] TEST_NEW_CC_DOMAIN_CRC32 = HexDump.hexStringToByteArray("76795BD3");
70 private static final byte[] TEST_NEW_CC_IP_SHA256 = HexDump.hexStringToByteArray(
72 private static final byte[] TEST_NEW_CC_IP_CRC32 = HexDump.hexStringToByteArray("940B8BEE");
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/cdma/sms/
DCdmaSmsTest.java121 HexDump.hexStringToByteArray(pdu)); in testRecipientAddress()
128 BearerData bearerData = BearerData.decode(HexDump.hexStringToByteArray(pdu)); in testUserData7bitGsm()
135 BearerData bearerData = BearerData.decode(HexDump.hexStringToByteArray(pdu)); in testUserData7bitAscii()
142 BearerData bearerData = BearerData.decode(HexDump.hexStringToByteArray(pdu)); in testUserData7bitAsciiTwo()
149 BearerData bearerData = BearerData.decode(HexDump.hexStringToByteArray(pdu)); in testUserDataIa5()
315 BearerData bearerData = BearerData.decode(HexDump.hexStringToByteArray(pdu)); in testMonolithicOne()
362 BearerData bearerData = BearerData.decode(HexDump.hexStringToByteArray(pdu)); in testMonolithicTwo()
520 BearerData bd1 = BearerData.decode(HexDump.hexStringToByteArray(pdu1)); in testReplyOption()
527 BearerData bd2 = BearerData.decode(HexDump.hexStringToByteArray(pdu2)); in testReplyOption()
534 BearerData bd3 = BearerData.decode(HexDump.hexStringToByteArray(pdu3)); in testReplyOption()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/
DSP800DeriveTests.java31 byte[] keyBytes = HexDump.hexStringToByteArray( in testFixedInput()
35 byte[] fixedInput = HexDump.hexStringToByteArray( in testFixedInput()
/frameworks/base/core/tests/utiltests/src/com/android/internal/util/
DBitwiseStreamsTest.java36 byte[] inBuf = HexDump.hexStringToByteArray("FFDD"); in testOne()
51 byte[] inBuf = HexDump.hexStringToByteArray("11d4f29c0e9ad3c36e72584e064d9b53"); in testTwo()
65 byte[] inBuf = HexDump.hexStringToByteArray("00031040900112488ea794e0"); in testThree()
79 byte[] inBuf = HexDump.hexStringToByteArray("00031040900112488ea794e0"); in testFour()
120 byte[] inBuf = HexDump.hexStringToByteArray("00031040900112488ea794e0"); in testSix()

12