ShortPaddingGenerator extends PaddingVectorGenerator { @Override public List<PaddingVector> getVectors(CipherSuite suite, ProtocolVersion version) { List<PaddingVector> vectorList = new LinkedList<>(); vectorList.addAll(createBasicMacVectors(suite, version)); vectorList.addAll(createMissingMacByteVectors(suite, version)); vectorList.addAll(createOnlyPaddingVectors(suite, version)); vectorList.addAll(createClassicModifiedPadding(suite, version)); return vectorList; }  @Override List<PaddingVector> getVectors(CipherSuite suite, ProtocolVersion version);  }
@Test public void testGetVectors() { for (CipherSuite suite : CipherSuite.getImplemented()) { if (suite.isCBC()) { List<PaddingVector> vectors = generator.getVectors(suite, ProtocolVersion.TLS12); for (PaddingVector vector : vectors) { int length = vector.getRecordLength(suite, ProtocolVersion.TLS12, 4); assertEquals("We only create vectors of the same length to omit false positives", ShortPaddingGenerator.DEFAULT_CIPHERTEXT_LENGTH, length); } } } }