class Kwp implements KeyWrap {

  @Override
  public byte[] wrap(final byte[] data) throws GeneralSecurityException {
    if (data.length < MIN_WRAP_KEY_SIZE) {
      throw new GeneralSecurityException("Key size of key to wrap too small");
    }
    if (data.length > MAX_WRAP_KEY_SIZE) {
      throw new GeneralSecurityException("Key size of key to wrap too large");
    }
    byte[] iv = new byte[8];
    System.arraycopy(PREFIX, 0, iv, 0, PREFIX.length);
    for (int i = 0; i < 4; i++) {
      iv[4 + i] = (byte) ((data.length >> (8 * (3 - i))) & 0xff);
    }
    return computeW(iv, data);
  }

  public  Kwp(final byte[] key);

}