Home
last modified time | relevance | path

Searched refs:inputBuffer (Results 1 – 24 of 24) sorted by relevance

/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/ipsec/ike/message/
DIkeIdPayloadTest.java211 ByteBuffer inputBuffer = ByteBuffer.allocate(payload.getPayloadLength()); in testConstructAndEncodeIpv4AddrIdPayload() local
212 payload.encodeToByteBuffer(IkePayload.PAYLOAD_TYPE_AUTH, inputBuffer); in testConstructAndEncodeIpv4AddrIdPayload()
216 assertArrayEquals(expectedBytes, inputBuffer.array()); in testConstructAndEncodeIpv4AddrIdPayload()
224 ByteBuffer inputBuffer = ByteBuffer.allocate(payload.getPayloadLength()); in testConstructAndEncodeIpv6AddrIdPayload() local
225 payload.encodeToByteBuffer(IkePayload.PAYLOAD_TYPE_AUTH, inputBuffer); in testConstructAndEncodeIpv6AddrIdPayload()
229 assertArrayEquals(expectedBytes, inputBuffer.array()); in testConstructAndEncodeIpv6AddrIdPayload()
237 ByteBuffer inputBuffer = ByteBuffer.allocate(payload.getPayloadLength()); in testConstructAndEncodeFqdnIdPayload() local
238 payload.encodeToByteBuffer(IkePayload.PAYLOAD_TYPE_CERT, inputBuffer); in testConstructAndEncodeFqdnIdPayload()
241 assertArrayEquals(expectedBytes, inputBuffer.array()); in testConstructAndEncodeFqdnIdPayload()
250 ByteBuffer inputBuffer = ByteBuffer.allocate(payload.getPayloadLength()); in testConstructAndEncodeRfc822AddrIdPayload() local
[all …]
DIkeSaPayloadTest.java267 ByteBuffer inputBuffer = ByteBuffer.wrap(inputPacket); in testDecodeAttribute() local
269 Pair<Attribute, Integer> pair = Attribute.readFrom(inputBuffer); in testDecodeAttribute()
290 ByteBuffer inputBuffer = ByteBuffer.wrap(inputPacket); in testDecodeEncryptionTransform() local
296 Transform transform = Transform.readFrom(inputBuffer); in testDecodeEncryptionTransform()
306 ByteBuffer inputBuffer = ByteBuffer.wrap(inputPacket); in testDecodeEncryptionTransformWithInvalidKeyLength() local
315 Transform.readFrom(inputBuffer); in testDecodeEncryptionTransformWithInvalidKeyLength()
352 ByteBuffer inputBuffer = ByteBuffer.wrap(inputPacket); in testDecodePrfTransform() local
358 Transform transform = Transform.readFrom(inputBuffer); in testDecodePrfTransform()
387 ByteBuffer inputBuffer = ByteBuffer.wrap(inputPacket); in testDecodeIntegrityTransform() local
393 Transform transform = Transform.readFrom(inputBuffer); in testDecodeIntegrityTransform()
[all …]
DIkeDeletePayloadTest.java54 ByteBuffer inputBuffer = in testDecodeDeleteIkePayload() local
59 IkePayload.PAYLOAD_TYPE_DELETE, false /*is request*/, inputBuffer) in testDecodeDeleteIkePayload()
73 ByteBuffer inputBuffer = in testDecodeDeleteChildPayload() local
78 IkePayload.PAYLOAD_TYPE_DELETE, false /*is request*/, inputBuffer) in testDecodeDeleteChildPayload()
96 ByteBuffer inputBuffer = ByteBuffer.wrap(deletePayloadBytes); in testDecodeWithInvalidProtocol() local
100 IkePayload.PAYLOAD_TYPE_DELETE, false /*is request*/, inputBuffer); in testDecodeWithInvalidProtocol()
111 ByteBuffer inputBuffer = ByteBuffer.wrap(deletePayloadBytes); in testDecodeWithInvalidSpiSize() local
115 IkePayload.PAYLOAD_TYPE_DELETE, false /*is request*/, inputBuffer); in testDecodeWithInvalidSpiSize()
126 ByteBuffer inputBuffer = ByteBuffer.wrap(deletePayloadBytes); in testDecodeWithInvalidNumSpi() local
130 IkePayload.PAYLOAD_TYPE_DELETE, false /*is request*/, inputBuffer); in testDecodeWithInvalidNumSpi()
[all …]
DIkeTsPayloadTest.java76 ByteBuffer inputBuffer = in testDecodeTsInitiatorPayload() local
81 IkePayload.PAYLOAD_TYPE_TS_INITIATOR, false, inputBuffer) in testDecodeTsInitiatorPayload()
/packages/modules/IPsec/src/java/com/android/internal/net/ipsec/ike/message/
DIkeSaPayload.java77 ByteBuffer inputBuffer = ByteBuffer.wrap(payloadBody); in IkeSaPayload() local
79 while (inputBuffer.hasRemaining()) { in IkeSaPayload()
80 Proposal proposal = Proposal.readFrom(inputBuffer); in IkeSaPayload()
514 Transform[] decodeTransforms(int count, ByteBuffer inputBuffer) throws IkeProtocolException; in decodeTransforms() argument
577 static Proposal readFrom(ByteBuffer inputBuffer) throws IkeProtocolException { in readFrom() argument
578 byte isLast = inputBuffer.get(); in readFrom()
584 inputBuffer.get(new byte[PROPOSAL_RESERVED_FIELD_LEN]); in readFrom()
586 int length = Short.toUnsignedInt(inputBuffer.getShort()); in readFrom()
587 byte number = inputBuffer.get(); in readFrom()
588 int protocolId = Byte.toUnsignedInt(inputBuffer.get()); in readFrom()
[all …]
DIkeDeletePayload.java77 ByteBuffer inputBuffer = ByteBuffer.wrap(payloadBody); in IkeDeletePayload() local
79 protocolId = Byte.toUnsignedInt(inputBuffer.get()); in IkeDeletePayload()
80 spiSize = inputBuffer.get(); in IkeDeletePayload()
81 numSpi = Short.toUnsignedInt(inputBuffer.getShort()); in IkeDeletePayload()
89 || inputBuffer.remaining() != 0) { in IkeDeletePayload()
97 || inputBuffer.remaining() != SPI_LEN_IPSEC * numSpi) { in IkeDeletePayload()
102 spisToDelete[i] = inputBuffer.getInt(); in IkeDeletePayload()
DIkeConfigPayload.java110 ByteBuffer inputBuffer = ByteBuffer.wrap(payloadBody); in IkeConfigPayload() local
111 configType = Byte.toUnsignedInt(inputBuffer.get()); in IkeConfigPayload()
112 inputBuffer.get(new byte[CONFIG_HEADER_RESERVED_LEN]); in IkeConfigPayload()
114 recognizedAttributeList = ConfigAttribute.decodeAttributeFrom(inputBuffer); in IkeConfigPayload()
200 static List<ConfigAttribute> decodeAttributeFrom(ByteBuffer inputBuffer) in decodeAttributeFrom() argument
204 while (inputBuffer.hasRemaining()) { in decodeAttributeFrom()
205 int attributeType = Short.toUnsignedInt(inputBuffer.getShort()); in decodeAttributeFrom()
206 int length = Short.toUnsignedInt(inputBuffer.getShort()); in decodeAttributeFrom()
208 inputBuffer.get(value); in decodeAttributeFrom()
626 ByteBuffer inputBuffer = ByteBuffer.wrap(value); in ConfigAttributeIpv4Subnet() local
[all …]
DIkeTsPayload.java52 ByteBuffer inputBuffer = ByteBuffer.wrap(payloadBody); in IkeTsPayload() local
53 numTs = Byte.toUnsignedInt(inputBuffer.get()); in IkeTsPayload()
59 inputBuffer.get(new byte[TS_HEADER_RESERVED_LEN]); in IkeTsPayload()
62 byte[] tsBytes = new byte[inputBuffer.remaining()]; in IkeTsPayload()
63 inputBuffer.get(tsBytes); in IkeTsPayload()
DIkeCertReqPayload.java59 ByteBuffer inputBuffer = ByteBuffer.wrap(payloadBody); in IkeCertReqPayload() local
60 certEncodingType = Byte.toUnsignedInt(inputBuffer.get()); in IkeCertReqPayload()
61 caSubjectPublicKeyInforHashes = new byte[inputBuffer.remaining()]; in IkeCertReqPayload()
62 inputBuffer.get(caSubjectPublicKeyInforHashes); in IkeCertReqPayload()
DIkeAuthPayload.java70 ByteBuffer inputBuffer = ByteBuffer.wrap(payloadBody); in getIkeAuthPayload() local
72 int authMethod = Byte.toUnsignedInt(inputBuffer.get()); in getIkeAuthPayload()
75 inputBuffer.get(reservedField); in getIkeAuthPayload()
78 inputBuffer.get(authData); in getIkeAuthPayload()
DIkeSkfPayload.java77 ByteBuffer inputBuffer = ByteBuffer.wrap(message); in IkeSkfPayload() local
78 inputBuffer.get(new byte[IkeHeader.IKE_HEADER_LENGTH + GENERIC_HEADER_LENGTH]); in IkeSkfPayload()
80 fragmentNum = Short.toUnsignedInt(inputBuffer.getShort()); in IkeSkfPayload()
81 totalFragments = Short.toUnsignedInt(inputBuffer.getShort()); in IkeSkfPayload()
DIkeIdPayload.java69 ByteBuffer inputBuffer = ByteBuffer.wrap(payloadBody); in IkeIdPayload() local
70 int idType = Byte.toUnsignedInt(inputBuffer.get()); in IkeIdPayload()
73 inputBuffer.get(new byte[ID_HEADER_RESERVED_LEN]); in IkeIdPayload()
76 inputBuffer.get(idData); in IkeIdPayload()
DIkeNotifyPayload.java233 ByteBuffer inputBuffer = ByteBuffer.wrap(payloadBody); in IkeNotifyPayload() local
235 protocolId = Byte.toUnsignedInt(inputBuffer.get()); in IkeNotifyPayload()
236 spiSize = inputBuffer.get(); in IkeNotifyPayload()
237 notifyType = Short.toUnsignedInt(inputBuffer.getShort()); in IkeNotifyPayload()
244 spi = inputBuffer.getInt(); in IkeNotifyPayload()
256 inputBuffer.get(notifyData); in IkeNotifyPayload()
DIkeAuthDigitalSignPayload.java131 ByteBuffer inputBuffer = ByteBuffer.wrap(authData); in IkeAuthDigitalSignPayload() local
134 int signAlgoLen = Byte.toUnsignedInt(inputBuffer.get()); in IkeAuthDigitalSignPayload()
136 inputBuffer.get(signAlgoBytes); in IkeAuthDigitalSignPayload()
141 inputBuffer.get(signature); in IkeAuthDigitalSignPayload()
DIkeKePayload.java107 ByteBuffer inputBuffer = ByteBuffer.wrap(payloadBody); in IkeKePayload() local
109 dhGroup = Short.toUnsignedInt(inputBuffer.getShort()); in IkeKePayload()
111 inputBuffer.getShort(); in IkeKePayload()
138 inputBuffer.get(keyExchangeData); in IkeKePayload()
DIkeCertPayload.java87 ByteBuffer inputBuffer = ByteBuffer.wrap(payloadBody); in getIkeCertPayload() local
89 int certEncodingType = Byte.toUnsignedInt(inputBuffer.get()); in getIkeCertPayload()
91 inputBuffer.get(certData); in getIkeCertPayload()
DIkeEncryptedPayloadBody.java78 ByteBuffer inputBuffer = ByteBuffer.wrap(message); in IkeEncryptedPayloadBody() local
81 inputBuffer.get(new byte[encryptedBodyOffset]); in IkeEncryptedPayloadBody()
93 inputBuffer.get(mIv).get(mEncryptedAndPaddedData).get(mIntegrityChecksum); in IkeEncryptedPayloadBody()
DIkeMessage.java151 ByteBuffer inputBuffer = ByteBuffer.wrap(unencryptedPayloads); in decodePayloadList() local
166 IkePayloadFactory.getIkePayload(currentPayloadType, isResp, inputBuffer); in decodePayloadList()
190 if (inputBuffer.remaining() > 0) { in decodePayloadList()
/packages/modules/IPsec/src/java/android/net/ipsec/ike/
DIkeTrafficSelector.java239 ByteBuffer inputBuffer = ByteBuffer.wrap(tsBytes); in decodeIkeTrafficSelectors() local
243 int tsType = Byte.toUnsignedInt(inputBuffer.get()); in decodeIkeTrafficSelectors()
246 tsArray[i] = decodeTrafficSelector(inputBuffer, in decodeIkeTrafficSelectors()
250 tsArray[i] = decodeTrafficSelector(inputBuffer, in decodeIkeTrafficSelectors()
263 if (inputBuffer.remaining() != 0) { in decodeIkeTrafficSelectors()
273 private static IkeTrafficSelector decodeTrafficSelector(ByteBuffer inputBuffer, int tsType) in decodeTrafficSelector() argument
276 int ipProtocolId = Byte.toUnsignedInt(inputBuffer.get()); in decodeTrafficSelector()
284 int tsLength = Short.toUnsignedInt(inputBuffer.getShort()); in decodeTrafficSelector()
290 int startPort = Short.toUnsignedInt(inputBuffer.getShort()); in decodeTrafficSelector()
291 int endPort = Short.toUnsignedInt(inputBuffer.getShort()); in decodeTrafficSelector()
[all …]
/packages/modules/IPsec/src/java/com/android/internal/net/ipsec/ike/crypto/
DIkeNormalModeCipher.java59 ByteBuffer inputBuffer = ByteBuffer.wrap(data); in doCipherAction() local
62 mCipher.doFinal(inputBuffer, outputBuffer); in doCipherAction()
DIkeMac.java90 ByteBuffer inputBuffer = ByteBuffer.wrap(dataToSign); in signBytes() local
92 mMac.update(inputBuffer); in signBytes()
DIkeCombinedModeCipher.java97 ByteBuffer inputBuffer = ByteBuffer.wrap(data); in doCipherAction() local
103 mCipher.doFinal(inputBuffer, outputBuffer); in doCipherAction()
DAesXCbcImpl.java148 ByteBuffer inputBuffer = ByteBuffer.wrap(dataToEncrypt); in encryptAesBlock() local
153 mCipher.doFinal(inputBuffer, outputBuffer); in encryptAesBlock()
/packages/apps/TV/tuner/src/com/android/tv/tuner/source/
DFileTsStreamer.java307 private int read(byte[] inputBuffer) { in read() argument
328 System.arraycopy(mPreBuffer, i, inputBuffer, destPos, TS_PACKET_SIZE); in read()