/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/eap/message/ |
D | EapTestMessageDefinitions.java | 19 import static com.android.internal.net.TestUtils.hexStringToByteArray; 40 hexStringToByteArray(EAP_REQUEST_TYPE_DATA); 43 public static final byte[] EAP_REQUEST_AKA = hexStringToByteArray("01" + ID + "000817050000"); 45 hexStringToByteArray("01" + ID + "000A17" + EAP_REQUEST_TYPE_DATA); 47 hexStringToByteArray("01" + ID + "000501"); 49 hexStringToByteArray("01" + ID + "00050100"); 53 public static final byte[] EAP_IDENTITY = hexStringToByteArray(EAP_IDENTITY_STRING); 55 hexStringToByteArray("02" + ID + "001501" + EAP_IDENTITY_STRING); 57 hexStringToByteArray("02" + ID + "000501"); 59 hexStringToByteArray("01" + ID + "000802AABBCC"); [all …]
|
/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/eap/message/simaka/attributes/ |
D | EapTestAttributeDefinitions.java | 19 import static com.android.internal.net.TestUtils.hexStringToByteArray; 33 hexStringToByteArray("0F02" + AT_VERSION_LIST_DATA); 34 public static final byte[] AT_SELECTED_VERSION = hexStringToByteArray("10010001"); 36 public static final byte[] NONCE_MT = hexStringToByteArray(NONCE_MT_STRING); 37 public static final byte[] AT_NONCE_MT = hexStringToByteArray("07050000" + NONCE_MT_STRING); 38 public static final byte[] AT_PERMANENT_ID_REQ = hexStringToByteArray("0A010000"); 39 public static final byte[] AT_ANY_ID_REQ = hexStringToByteArray("0D010000"); 40 public static final byte[] AT_FULL_AUTH_ID_REQ = hexStringToByteArray("11010000"); 44 public static final byte[] IDENTITY = hexStringToByteArray(IDENTITY_STRING); 46 hexStringToByteArray("0E060011" + IDENTITY_STRING + "000000"); [all …]
|
/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/ipsec/ike/crypto/ |
D | IkeMacPrfTest.java | 19 import static com.android.internal.net.TestUtils.hexStringToByteArray; 164 byte[] skpBytes = TestUtils.hexStringToByteArray(PRF_KEY_HEX_STRING); in testSignBytesHmacSha1() 165 byte[] dataBytes = TestUtils.hexStringToByteArray(DATA_TO_SIGN_HEX_STRING); in testSignBytesHmacSha1() 169 byte[] expectedBytes = TestUtils.hexStringToByteArray(CALCULATED_MAC_HEX_STRING); in testSignBytesHmacSha1() 175 byte[] skpBytes = TestUtils.hexStringToByteArray(PRF_HMAC256_KEY_HEX_STRING); in testSignBytesHmacSha256() 176 byte[] dataBytes = TestUtils.hexStringToByteArray(PRF_HMAC256_DATA_TO_SIGN_HEX_STRING); in testSignBytesHmacSha256() 181 TestUtils.hexStringToByteArray(PRF_HMAC256_CALCULATED_MAC_HEX_STRING); in testSignBytesHmacSha256() 187 byte[] nonceInit = TestUtils.hexStringToByteArray(IKE_NONCE_INIT_HEX_STRING); in testGenerateSKeySeedHmacSha1() 188 byte[] nonceResp = TestUtils.hexStringToByteArray(IKE_NONCE_RESP_HEX_STRING); in testGenerateSKeySeedHmacSha1() 189 byte[] sharedDhKey = TestUtils.hexStringToByteArray(IKE_SHARED_DH_KEY_HEX_STRING); in testGenerateSKeySeedHmacSha1() [all …]
|
D | IkeMacIntegrityTest.java | 78 mHmacSha1IntegrityKey = TestUtils.hexStringToByteArray(INTEGRITY_KEY_HEX_STRING); in setUp() 80 mDataToAuthenticate = TestUtils.hexStringToByteArray(DATA_TO_AUTH_HEX_STRING); in setUp() 91 byte[] expectedChecksum = TestUtils.hexStringToByteArray(CHECKSUM_HEX_STRING); in testGenerateChecksum() 103 byte[] expectedChecksum = TestUtils.hexStringToByteArray(CHECKSUM_HEX_STRING); in testGenerateChecksumWithDifferentKey() 109 byte[] integrityKey = TestUtils.hexStringToByteArray(INTEGRITY_KEY_HEX_STRING + "0000"); in testGenerateChecksumWithInvalidKey() 133 byte[] encryptionKey = TestUtils.hexStringToByteArray(INTEGRITY_KEY_HEX_STRING + "00"); in buildIpSecAlgorithmWithInvalidKey() 146 byte[] skpBytes = TestUtils.hexStringToByteArray(AUTH_AES128XCBC_KEY_HEX_STRING); in testSignBytesAuthAes128XCbc() 147 byte[] dataBytes = TestUtils.hexStringToByteArray(AUTH_AES128XCBC_DATA_TO_SIGN_HEX_STRING); in testSignBytesAuthAes128XCbc() 152 TestUtils.hexStringToByteArray(AUTH_AES128XCBC_CALCULATED_MAC_HEX_STRING); in testSignBytesAuthAes128XCbc() 159 byte[] skpBytes = TestUtils.hexStringToByteArray(AUTH_AES128XCBC_KEY_HEX_STRING1); in testSignBytesAuthAes128XCbcWith16ByteInput() [all …]
|
D | IkeNormalModeCipherTest.java | 81 mAesCbcKey = TestUtils.hexStringToByteArray(ENCR_KEY_FROM_INIT_TO_RESP); in setUp() 83 mIv = TestUtils.hexStringToByteArray(IKE_AUTH_INIT_REQUEST_IV); in setUp() 85 TestUtils.hexStringToByteArray(IKE_AUTH_INIT_REQUEST_ENCRYPT_PADDED_DATA); in setUp() 87 TestUtils.hexStringToByteArray(IKE_AUTH_INIT_REQUEST_UNENCRYPTED_PADDED_DATA); in setUp() 117 byte[] encryptionKey = TestUtils.hexStringToByteArray(ENCR_KEY_FROM_INIT_TO_RESP + "00"); in testEncryptWithWrongKey() 130 TestUtils.hexStringToByteArray( in testDecryptWithNormalCipherWithBadPad() 152 byte[] encryptionKey = TestUtils.hexStringToByteArray(ENCR_KEY_FROM_INIT_TO_RESP + "00"); in buildIpSecAlgorithmWithInvalidKey()
|
/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/eap/message/mschapv2/ |
D | EapMsChapV2PacketDefinitions.java | 19 import static com.android.internal.net.TestUtils.hexStringToByteArray; 26 public static final byte[] CHALLENGE_BYTES = hexStringToByteArray(CHALLENGE); 30 public static final byte[] SERVER_NAME_BYTES = hexStringToByteArray(SERVER_NAME); 32 hexStringToByteArray("01" + ID + "002E10" + CHALLENGE + SERVER_NAME); 34 public static final byte[] CHALLENGE_REQUEST_WRONG_OP_CODE = hexStringToByteArray("02"); 36 public static final byte[] SHORT_CHALLENGE_BYTES = hexStringToByteArray(SHORT_CHALLENGE); 38 hexStringToByteArray("01" + ID + "002406" + SHORT_CHALLENGE + SERVER_NAME); 40 hexStringToByteArray("01" + ID + "000110" + CHALLENGE + SERVER_NAME); 42 hexStringToByteArray("01" + ID + "00FF10" + CHALLENGE + SERVER_NAME); 45 public static final byte[] PEER_CHALLENGE_BYTES = hexStringToByteArray(PEER_CHALLENGE); [all …]
|
/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/ipsec/ike/message/ |
D | IkeEncryptedPayloadBodyTest.java | 196 TestUtils.hexStringToByteArray(IKE_AUTH_INIT_REQUEST_UNENCRYPTED_DATA); in setUp() 202 mDataToAuthenticate = TestUtils.hexStringToByteArray(hexStringToAuthenticate); in setUp() 204 TestUtils.hexStringToByteArray(IKE_AUTH_INIT_REQUEST_ENCRYPT_PADDED_DATA); in setUp() 206 TestUtils.hexStringToByteArray( in setUp() 213 mChecksum = TestUtils.hexStringToByteArray(IKE_AUTH_INIT_REQUEST_CHECKSUM); in setUp() 214 mIv = TestUtils.hexStringToByteArray(IKE_AUTH_INIT_REQUEST_IV); in setUp() 215 mPadding = TestUtils.hexStringToByteArray(IKE_AUTH_INIT_REQUEST_PADDING); in setUp() 228 mAesCbcKey = TestUtils.hexStringToByteArray(ENCR_KEY_FROM_INIT_TO_RESP); in setUp() 233 mHmacSha1IntegrityKey = TestUtils.hexStringToByteArray(INTE_KEY_FROM_INIT_TO_RESP); in setUp() 242 mAesGcmMsgKey = TestUtils.hexStringToByteArray(AES_GCM_MSG_ENCR_KEY); in setUp() [all …]
|
D | IkeSaPayloadTest.java | 266 byte[] inputPacket = TestUtils.hexStringToByteArray(ATTRIBUTE_RAW_PACKET); in testDecodeAttribute() 282 byte[] expectedBytes = TestUtils.hexStringToByteArray(ATTRIBUTE_RAW_PACKET); in testEncodeAttribute() 289 byte[] inputPacket = TestUtils.hexStringToByteArray(ENCR_TRANSFORM_RAW_PACKET); in testDecodeEncryptionTransform() 305 byte[] inputPacket = TestUtils.hexStringToByteArray(ENCR_TRANSFORM_RAW_PACKET); in testDecodeEncryptionTransformWithInvalidKeyLength() 326 byte[] expectedBytes = TestUtils.hexStringToByteArray(ENCR_TRANSFORM_RAW_PACKET); in testEncodeEncryptionTransform() 351 byte[] inputPacket = TestUtils.hexStringToByteArray(PRF_TRANSFORM_RAW_PACKET); in testDecodePrfTransform() 370 byte[] expectedBytes = TestUtils.hexStringToByteArray(PRF_TRANSFORM_RAW_PACKET); in testEncodePrfTransform() 386 byte[] inputPacket = TestUtils.hexStringToByteArray(INTEG_TRANSFORM_RAW_PACKET); in testDecodeIntegrityTransform() 402 byte[] inputPacket = TestUtils.hexStringToByteArray(INTEG_TRANSFORM_RAW_PACKET); in testDecodeIntegrityTransformWithUnrecognizedAttribute() 421 byte[] expectedBytes = TestUtils.hexStringToByteArray(INTEG_TRANSFORM_RAW_PACKET); in testEncodeIntegrityTransform() [all …]
|
D | IkeAuthDigitalSignPayloadTest.java | 80 TestUtils.hexStringToByteArray(IKE_INIT_RESP_HEX_STRING); 82 TestUtils.hexStringToByteArray(NONCE_INIT_HEX_STRING); 84 TestUtils.hexStringToByteArray(ID_RESP_PAYLOAD_BODY_HEX_STRING); 85 private static final byte[] PRF_RESP_KEY = TestUtils.hexStringToByteArray(SKP_RESP_HEX_STRING); 98 TestUtils.hexStringToByteArray(AUTH_PAYLOAD_BODY_GENERIC_DIGITAL_SIGN_HEX_STRING); in testDecodeGenericDigitalSignPayload() 104 assertArrayEquals(dsPayload.signature, TestUtils.hexStringToByteArray(SIGNATURE)); in testDecodeGenericDigitalSignPayload() 125 TestUtils.hexStringToByteArray( in testSignAndEncode() 133 TestUtils.hexStringToByteArray(AUTH_PAYLOAD_BODY_GENERIC_DIGITAL_SIGN_HEX_STRING); in testVerifyInboundSignature() 151 TestUtils.hexStringToByteArray(AUTH_PAYLOAD_BODY_GENERIC_DIGITAL_SIGN_HEX_STRING); in testVerifyInboundSignatureFail() 155 assertArrayEquals(payload.signature, TestUtils.hexStringToByteArray(SIGNATURE)); in testVerifyInboundSignatureFail() [all …]
|
D | IkeConfigPayloadTest.java | 94 TestUtils.hexStringToByteArray(CONFIG_REQ_PAYLOAD_HEX); 96 TestUtils.hexStringToByteArray(CONFIG_RESP_PAYLOAD_HEX); 107 TestUtils.hexStringToByteArray("00010004c0000264"); 109 TestUtils.hexStringToByteArray("00010000"); 112 TestUtils.hexStringToByteArray("00020000"); 117 TestUtils.hexStringToByteArray("08080808"); 119 TestUtils.hexStringToByteArray("00030000"); 124 TestUtils.hexStringToByteArray("00060004c00002c8"); 126 TestUtils.hexStringToByteArray("00060000"); 129 TestUtils.hexStringToByteArray("c0000264fffffff0"); [all …]
|
D | IkeIdPayloadTest.java | 107 TestUtils.hexStringToByteArray(IPV4_ADDR_ID_PAYLOAD_RESPONDER_BODY_HEX_STRING); in testDecodeIpv4AddrIdPayload() 120 TestUtils.hexStringToByteArray(IPV6_ADDR_ID_PAYLOAD_RESPONDER_BODY_HEX_STRING); in testDecodeIpv6AddrIdPayload() 132 byte[] inputPacket = TestUtils.hexStringToByteArray(FQDN_ID_PAYLOAD_BODY_HEX_STRING); in testDecodeFqdnIdPayload() 145 byte[] inputPacket = TestUtils.hexStringToByteArray(RFC822_ADDR_ID_PAYLOAD_BODY_HEX_STRING); in testDecodeRfc822AddrIdPayload() 157 byte[] inputPacket = TestUtils.hexStringToByteArray(KEY_ID_PAYLOAD_BODY_HEX_STRING); in testDecodeKeyIdPayload() 169 byte[] inputPacket = TestUtils.hexStringToByteArray(ASN1_DN_PAYLOAD_BODY_HEX_STRING); in testDecodeDerAsn1DnIdPayload() 185 TestUtils.hexStringToByteArray(ASN1_DN_INVALID_PAYLOAD_BODY_HEX_STRING); in testDecodeInvalidDerAsn1DnIdPayload() 196 TestUtils.hexStringToByteArray(IPV4_ADDR_ID_PAYLOAD_RESPONDER_BODY_HEX_STRING); in testDecodeUnsupportedIdType() 215 TestUtils.hexStringToByteArray(IPV4_ADDR_ID_PAYLOAD_RESPONDER_HEX_STRING); in testConstructAndEncodeIpv4AddrIdPayload() 228 TestUtils.hexStringToByteArray(IPV6_ADDR_ID_PAYLOAD_RESPONDER_HEX_STRING); in testConstructAndEncodeIpv6AddrIdPayload() [all …]
|
D | IkeDeletePayloadTest.java | 55 ByteBuffer.wrap(TestUtils.hexStringToByteArray(DELETE_IKE_PAYLOAD_HEX_STRING)); in testDecodeDeleteIkePayload() 74 ByteBuffer.wrap(TestUtils.hexStringToByteArray(DELETE_CHILD_PAYLOAD_HEX_STRING)); in testDecodeDeleteChildPayload() 94 byte[] deletePayloadBytes = TestUtils.hexStringToByteArray(DELETE_IKE_PAYLOAD_HEX_STRING); in testDecodeWithInvalidProtocol() 109 byte[] deletePayloadBytes = TestUtils.hexStringToByteArray(DELETE_IKE_PAYLOAD_HEX_STRING); in testDecodeWithInvalidSpiSize() 124 byte[] deletePayloadBytes = TestUtils.hexStringToByteArray(DELETE_IKE_PAYLOAD_HEX_STRING); in testDecodeWithInvalidNumSpi() 139 byte[] deletePayloadBytes = TestUtils.hexStringToByteArray(DELETE_IKE_PAYLOAD_HEX_STRING); in testDecodeWithInvalidNumSpiAndSpiSize() 201 byte[] expectedPayloadBytes = TestUtils.hexStringToByteArray(DELETE_IKE_PAYLOAD_HEX_STRING); in testEncodeForIke() 214 TestUtils.hexStringToByteArray(DELETE_CHILD_PAYLOAD_HEX_STRING); in testEncodeWithSingleChildSa() 230 TestUtils.hexStringToByteArray(DELETE_MULTIPLE_CHILD_PAYLOAD_HEX_STRING); in testEncodeWithMultipleChildSas() 238 byte[] expectedPayloadBytes = TestUtils.hexStringToByteArray(DELETE_IKE_PAYLOAD_HEX_STRING); in testPayloadLengthForIke() [all …]
|
D | IkeAuthPayloadTest.java | 97 byte[] inputPacket = TestUtils.hexStringToByteArray(PSK_AUTH_PAYLOAD_HEX_STRING); in testDecodeIkeAuthPayload() 104 TestUtils.hexStringToByteArray(PSK_AUTH_PAYLOAD_SIGNATURE_HEX_STRING); in testDecodeIkeAuthPayload() 110 byte[] inputPacket = TestUtils.hexStringToByteArray(PSK_AUTH_PAYLOAD_HEX_STRING); in testDecodeIkeAuthPayloadWithUnsupportedMethod() 121 byte[] skpBytes = TestUtils.hexStringToByteArray(PSK_SKP_HEX_STRING); in testGetSignedOctets() 122 byte[] idBytes = TestUtils.hexStringToByteArray(PSK_ID_PAYLOAD_HEX_STRING); in testGetSignedOctets() 123 byte[] ikeInitRequest = TestUtils.hexStringToByteArray(PSK_IKE_INIT_REQUEST_HEX_STRING); in testGetSignedOctets() 124 byte[] nonceResp = TestUtils.hexStringToByteArray(PSK_NONCE_RESP_HEX_STRING); in testGetSignedOctets() 129 byte[] expectedBytes = TestUtils.hexStringToByteArray(PSK_INIT_SIGNED_OCTETS); in testGetSignedOctets()
|
D | IkeAuthPskPayloadTest.java | 69 private static final byte[] PSK = TestUtils.hexStringToByteArray(PSK_HEX_STRING); 71 TestUtils.hexStringToByteArray(PSK_IKE_INIT_REQUEST_HEX_STRING); 72 private static final byte[] NONCE = TestUtils.hexStringToByteArray(PSK_NONCE_RESP_HEX_STRING); 74 TestUtils.hexStringToByteArray(PSK_ID_INITIATOR_PAYLOAD_HEX_STRING); 75 private static final byte[] PRF_KEY = TestUtils.hexStringToByteArray(PSK_SKP_HEX_STRING); 77 TestUtils.hexStringToByteArray(PSK_AUTH_PAYLOAD_SIGNATURE_HEX_STRING); 98 byte[] expectedPayload = TestUtils.hexStringToByteArray(PSK_AUTH_PAYLOAD_HEX_STRING); in testBuildOutboundIkeAuthPskPayload() 108 byte[] payloadBody = TestUtils.hexStringToByteArray(PSK_AUTH_PAYLOAD_BODY_HEX_STRING); in buildPskPayload()
|
D | IkeSkfPayloadTest.java | 84 mDecryptedData = TestUtils.hexStringToByteArray(IKE_FRAG_MSG_DECRYPTED_BODY_HEX_STRING); in setUp() 92 byte[] expectedChecksum = TestUtils.hexStringToByteArray(IKE_FRAG_MSG_CHECKSUM); in setUp() 104 TestUtils.hexStringToByteArray( in setUp() 125 byte[] message = TestUtils.hexStringToByteArray(IKE_FRAG_MSG_HEX_STRING); in testDecode() 137 byte[] message = TestUtils.hexStringToByteArray(IKE_FRAG_MSG_HEX_STRING); in testDecodeThrowsForZeroFragNum() 152 byte[] message = TestUtils.hexStringToByteArray(IKE_FRAG_MSG_HEX_STRING); in testDecodeThrowsForZeroTotalFragments() 167 byte[] message = TestUtils.hexStringToByteArray(IKE_FRAG_MSG_HEX_STRING); in testDecodeThrowsWhenFragNumIsLargerThanTotalFragments() 188 byte[] message = TestUtils.hexStringToByteArray(IKE_FRAG_MSG_HEX_STRING); in testEncode()
|
D | IkeKePayloadTest.java | 117 byte[] inputPacket = TestUtils.hexStringToByteArray(KE_PAYLOAD_RAW_PACKET); in testDecodeIkeKePayload() 124 byte[] keyExchangeData = TestUtils.hexStringToByteArray(KEY_EXCHANGE_DATA_RAW_PACKET); in testDecodeIkeKePayload() 136 byte[] inputPacket = TestUtils.hexStringToByteArray(badKeyPayloadPacket); in testDecodeIkeKePayloadWithInvalidKeData() 147 byte[] inputPacket = TestUtils.hexStringToByteArray(KE_PAYLOAD_RAW_PACKET); in testEncodeIkeKePayload() 154 TestUtils.hexStringToByteArray(KE_PAYLOAD_GENERIC_HEADER + KE_PAYLOAD_RAW_PACKET); in testEncodeIkeKePayload() 186 byte[] remotePublicKey = TestUtils.hexStringToByteArray(PUBLIC_KEY_REMOTE); in testGetSharedkey() 189 byte[] expectedSharedKeyBytes = TestUtils.hexStringToByteArray(EXPECTED_SHARED_KEY); in testGetSharedkey() 195 byte[] remotePublicKey = TestUtils.hexStringToByteArray(PRIME_1024_BIT_MODP_160_SUBGROUP); in testGetSharedkeyWithInvalidRemoteKey()
|
D | IkeMessageTest.java | 236 mIkeAuthPacket = TestUtils.hexStringToByteArray(IKE_AUTH_HEX_STRING); in setUp() 238 TestUtils.hexStringToByteArray(IKE_AUTH_UNENCRYPTED_PADDED_DATA_HEX_STRING); in setUp() 243 TestUtils.hexStringToByteArray(IKE_AUTH_EXPECTED_CHECKSUM_HEX_STRING); in setUp() 271 byte[] packet = TestUtils.hexStringToByteArray(IKE_FRAG_HEX_STRING); in makeFragmentBytes() 307 byte[] inputPacket = TestUtils.hexStringToByteArray(IKE_SA_INIT_RAW_PACKET); in testDecodeIkeMessage() 323 byte[] inputPacket = TestUtils.hexStringToByteArray(IKE_SA_INIT_RAW_PACKET); in testDecodeMessageWithUnsupportedUncriticalPayload() 342 byte[] inputPacket = TestUtils.hexStringToByteArray(IKE_SA_INIT_RAW_PACKET); in testThrowUnsupportedCriticalPayloadException() 356 byte[] inputPacket = TestUtils.hexStringToByteArray(IKE_SA_INIT_RAW_PACKET); in testDecodeMessageWithTooShortPayloadLength() 366 byte[] inputPacket = TestUtils.hexStringToByteArray(IKE_SA_INIT_RAW_PACKET); in testDecodeMessageWithTooLongPayloadLength() 375 byte[] inputPacket = TestUtils.hexStringToByteArray(IKE_SA_INIT_RAW_PACKET + "0000"); in testDecodeMessageWithUnexpectedBytesInTheEnd() [all …]
|
/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/eap/ |
D | EapAkaPrimeTest.java | 21 import static com.android.internal.net.TestUtils.hexStringToByteArray; 57 hexStringToByteArray("7465737440616E64726F69642E6E6574"); 80 hexStringToByteArray( 86 hexStringToByteArray( 102 hexStringToByteArray( 108 hexStringToByteArray( 137 hexStringToByteArray( 142 hexStringToByteArray( 148 hexStringToByteArray( 157 hexStringToByteArray( [all …]
|
D | EapSimTest.java | 21 import static com.android.internal.net.TestUtils.hexStringToByteArray; 49 private static final byte[] NONCE = hexStringToByteArray("37f3ddd3954c4831a5ee08c574844398"); 54 hexStringToByteArray("7465737440616E64726F69642E6E6574"); 75 hexStringToByteArray( 80 private static final byte[] EMSK = hexStringToByteArray( 90 hexStringToByteArray( 96 hexStringToByteArray( 102 private static final byte[] EAP_SIM_START_REQUEST = hexStringToByteArray( 106 private static final byte[] EAP_SIM_START_RESPONSE = hexStringToByteArray( 111 private static final byte[] EAP_SIM_CHALLENGE_REQUEST = hexStringToByteArray( [all …]
|
D | EapAkaTest.java | 21 import static com.android.internal.net.TestUtils.hexStringToByteArray; 53 hexStringToByteArray("7465737440616E64726F69642E6E6574"); 67 hexStringToByteArray( 73 hexStringToByteArray( 85 hexStringToByteArray( 91 hexStringToByteArray( 120 hexStringToByteArray( 125 hexStringToByteArray( 131 hexStringToByteArray( 138 hexStringToByteArray( [all …]
|
D | EapMsChapV2Test.java | 19 import static com.android.internal.net.TestUtils.hexStringToByteArray; 42 hexStringToByteArray("21402324255E262A28295F2B3A337C7E"); 44 hexStringToByteArray( 49 hexStringToByteArray("01110033" // EAP-Request | ID | length in bytes 55 hexStringToByteArray("0211003F" // EAP-Response | ID | length in bytes 64 hexStringToByteArray("01120047" // EAP-Request | ID | length in bytes 72 hexStringToByteArray("02120006" // EAP-Response | ID | length in bytes 75 hexStringToByteArray("01130049" // EAP-Request | ID | length in bytes 86 hexStringToByteArray("02130006" // EAP-Response | ID | length in bytes 89 private static final byte[] EAP_RESPONSE_NAK_PACKET = hexStringToByteArray("02100006031A");
|
/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/ipsec/ike/ |
D | SaRecordTest.java | 173 byte[] sKeySeed = TestUtils.hexStringToByteArray(IKE_SKEYSEED_HEX_STRING); in testMakeIkeSaRecord() 174 byte[] nonceInit = TestUtils.hexStringToByteArray(IKE_NONCE_INIT_HEX_STRING); in testMakeIkeSaRecord() 175 byte[] nonceResp = TestUtils.hexStringToByteArray(IKE_NONCE_RESP_HEX_STRING); in testMakeIkeSaRecord() 204 TestUtils.hexStringToByteArray(IKE_SK_D_HEX_STRING), ikeSaRecord.getSkD()); in testMakeIkeSaRecord() 206 TestUtils.hexStringToByteArray(IKE_SK_AUTH_INIT_HEX_STRING), in testMakeIkeSaRecord() 209 TestUtils.hexStringToByteArray(IKE_SK_AUTH_RESP_HEX_STRING), in testMakeIkeSaRecord() 212 TestUtils.hexStringToByteArray(IKE_SK_ENCR_INIT_HEX_STRING), in testMakeIkeSaRecord() 215 TestUtils.hexStringToByteArray(IKE_SK_ENCR_RESP_HEX_STRING), in testMakeIkeSaRecord() 218 TestUtils.hexStringToByteArray(IKE_SK_PRF_INIT_HEX_STRING), ikeSaRecord.getSkPi()); in testMakeIkeSaRecord() 220 TestUtils.hexStringToByteArray(IKE_SK_PRF_RESP_HEX_STRING), ikeSaRecord.getSkPr()); in testMakeIkeSaRecord() [all …]
|
/packages/modules/IPsec/tests/iketests/src/java/android/net/ipsec/ike/ |
D | IkeTrafficSelectorTest.java | 102 TestUtils.hexStringToByteArray(TS_IPV4_ONE_HEX_STRING + TS_IPV4_TWO_HEX_STRING); in testDecodeIkeTrafficSelectors() 144 byte[] expectedBytes = TestUtils.hexStringToByteArray(TS_IPV4_ONE_HEX_STRING); in testBuildAndEncodeIkeTrafficSelector() 181 byte[] tsBytes = TestUtils.hexStringToByteArray(TS_IPV4_ONE_HEX_STRING); in testDecodeIkeTrafficSelectorWithInvalidTsType() 195 byte[] tsBytes = TestUtils.hexStringToByteArray(TS_IPV4_ONE_HEX_STRING); in testDecodeIkeTrafficSelectorWithInvalidIpProtocol() 209 byte[] tsBytes = TestUtils.hexStringToByteArray(TS_IPV4_ONE_HEX_STRING + "FFFF"); in testDecodeIkeTrafficSelectorWithExpectedTrailing() 222 byte[] tsBytes = TestUtils.hexStringToByteArray(TS_IPV4_ONE_HEX_STRING); in testDecodeIkeTrafficSelectorWithInvalidTsLength() 239 byte[] tsBytes = TestUtils.hexStringToByteArray(TX_IPV4_INVALID_PORT_RANGE_HEX_STRING); in testDecodeIkeTrafficSelectorWithInvalidPortRange() 252 byte[] tsBytes = TestUtils.hexStringToByteArray(TX_IPV4_INVALID_ADDRESS_RANGE_HEX_STRING); in testDecodeIkeTrafficSelectorWithInvalidAddressRange() 331 byte[] expectedBytes = TestUtils.hexStringToByteArray(TS_IPV6_THREE_HEX_ADDRESS); in testBuildAndEncodeIpv6TrafficSelector() 385 byte[] tsBytes = TestUtils.hexStringToByteArray(TS_IPV6_THREE_HEX_ADDRESS); in testDecodeIpv6TS() [all …]
|
/packages/modules/NetworkStack/tests/unit/src/android/net/dhcp/ |
D | DhcpPacketTest.java | 339 final ByteBuffer packet = ByteBuffer.wrap(HexDump.hexStringToByteArray( in testOffer1() 372 final ByteBuffer packet = ByteBuffer.wrap(HexDump.hexStringToByteArray( in testOffer2() 407 final ByteBuffer packet = ByteBuffer.wrap(HexDump.hexStringToByteArray( in runCapportOptionTest() 452 final ByteBuffer packet = ByteBuffer.wrap(HexDump.hexStringToByteArray( in testCapportOption_Invalid() 489 final byte[] packet = HexDump.hexStringToByteArray( in testBadIpPacket() 505 final byte[] packet = HexDump.hexStringToByteArray( in testBadDhcpPacket() 524 final byte[] packet = HexDump.hexStringToByteArray( in testBadTruncatedOffer() 553 final byte[] packet = HexDump.hexStringToByteArray( in testBadOfferWithoutACookie() 584 final byte[] packet = HexDump.hexStringToByteArray( in testOfferWithBadCookie() 620 final byte[] packet = HexDump.hexStringToByteArray( in testTruncatedOfferPackets() [all …]
|
/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/eap/message/ttls/ |
D | EapTtlsTypeDataTest.java | 19 import static com.android.internal.net.TestUtils.hexStringToByteArray; 41 hexStringToByteArray(EAP_TTLS_REQUEST_DATA); 44 hexStringToByteArray("00" + EAP_TTLS_REQUEST_DATA); 46 hexStringToByteArray("20" + EAP_TTLS_REQUEST_DATA); 48 hexStringToByteArray("80" + "00000000" + EAP_TTLS_REQUEST_DATA); 49 private static final byte[] EAP_TTLS_REQUEST_START = hexStringToByteArray("20"); 51 private static final byte[] EAP_TTLS_REQUEST_START_NOT_SET = hexStringToByteArray("00"); 52 private static final byte[] EAP_TTLS_RESPONSE_ACK = hexStringToByteArray("00");
|