public static void main(String[] args) {
        if(args.length != 3)
        {
            System.out.println("Wrong argumentcount");
        }
//        String privateKeyfile = "MHuebner.prv";
//        String datafile = "foo.ssf";
//        String outputFile = "foo.pdf";

        String privateKeyfile = args[0];
        String datafile = args[1];
        String outputFile = args[2];

        PrivateKey privateKey = SSF.readPrivateKeyFromFile(privateKeyfile);
        SecretKey sk;
        File encryptedFile = new File(datafile);
        DataInputStream is;
        try {
            long fileLength = encryptedFile.length();
            is = new DataInputStream(new FileInputStream(encryptedFile));
            int skLength = is.readInt();
            byte[] keyArray = new byte[skLength];
            is.read(keyArray);
            int signatureLength = is.readInt();
            byte[] sigArray = new byte[signatureLength];
            is.read(sigArray);
            long sum = skLength+signatureLength;
            long restBytes = (fileLength-sum);
            if(Integer.MAX_VALUE < restBytes)
            {
                System.out.println("FUCK!");
                return;
            }

            sk = decryptSecretKey(keyArray, privateKey);
            decryptDataFile(is, sk, outputFile);
            is.close();


        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }

    }