Home
last modified time | relevance | path

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

/packages/modules/IPsec/tests/cts/src/android/ipsec/ike/cts/
DPacketUtils.java428 int payloadLen, int cryptIvLength, int cryptBlockSize, int authTruncLen) { in calculateEspPacketSize() argument
431 payloadLen += cryptIvLength; // Initialization Vector in calculateEspPacketSize()
434 payloadLen = calculateEspEncryptedLength(payloadLen, cryptBlockSize); in calculateEspPacketSize()
435 return payloadLen + ESP_HDRLEN + ICV_LEN; in calculateEspPacketSize()
438 private static int calculateEspEncryptedLength(int payloadLen, int cryptBlockSize) { in calculateEspEncryptedLength() argument
439 payloadLen += 2; // ESP trailer in calculateEspEncryptedLength()
442 return payloadLen + calculateEspPadLen(payloadLen, cryptBlockSize); in calculateEspEncryptedLength()
445 private static int calculateEspPadLen(int payloadLen, int cryptBlockSize) { in calculateEspPadLen() argument
446 return (cryptBlockSize - (payloadLen % cryptBlockSize)) % cryptBlockSize; in calculateEspPadLen()
/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/
DPacketUtils.java461 int payloadLen, int cryptIvLength, int cryptBlockSize, int authTruncLen) { in calculateEspPacketSize() argument
465 payloadLen = calculateEspEncryptedLength(payloadLen, cryptBlockSize); in calculateEspPacketSize()
466 payloadLen += cryptIvLength; // Initialization Vector in calculateEspPacketSize()
467 return (short) (payloadLen + ESP_HDRLEN + ICV_LEN); in calculateEspPacketSize()
470 private static int calculateEspEncryptedLength(int payloadLen, int cryptBlockSize) { in calculateEspEncryptedLength() argument
471 payloadLen += 2; // ESP trailer in calculateEspEncryptedLength()
474 return payloadLen + calculateEspPadLen(payloadLen, cryptBlockSize); in calculateEspEncryptedLength()
477 private static int calculateEspPadLen(int payloadLen, int cryptBlockSize) { in calculateEspPadLen() argument
478 return (cryptBlockSize - (payloadLen % cryptBlockSize)) % cryptBlockSize; in calculateEspPadLen()