Home
last modified time | relevance | path

Searched refs:paddedPayload (Results 1 – 2 of 2) sorted by relevance

/packages/modules/IPsec/tests/cts/src/android/ipsec/ike/cts/
DPacketUtils.java380 ByteBuffer paddedPayload = ByteBuffer.allocate(paddedLen); in getCiphertext() local
381 paddedPayload.put(payload); in getCiphertext()
385 while (paddedPayload.position() < paddedPayload.limit()) { in getCiphertext()
386 paddedPayload.put((byte) pad++); in getCiphertext()
389 paddedPayload.position(paddedPayload.limit() - 2); in getCiphertext()
390 paddedPayload.put((byte) (paddedLen - 2 - payload.length)); // Pad length in getCiphertext()
391 paddedPayload.put((byte) nextHeader); in getCiphertext()
402 byte[] encrypted = cipher.doFinal(getByteArrayFromBuffer(paddedPayload)); in getCiphertext()
/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/
DPacketUtils.java523 final ByteBuffer paddedPayload = ByteBuffer.allocate(paddedLen); in getPaddedPayload() local
524 paddedPayload.put(payload); in getPaddedPayload()
528 while (paddedPayload.position() < paddedPayload.limit() - ESP_TRAILER_LEN) { in getPaddedPayload()
529 paddedPayload.put((byte) pad++); in getPaddedPayload()
533 paddedPayload.put((byte) (paddedLen - ESP_TRAILER_LEN - payload.length)); in getPaddedPayload()
534 paddedPayload.put((byte) nextHeader); in getPaddedPayload()
536 return getByteArrayFromBuffer(paddedPayload); in getPaddedPayload()