public byte[] getHash(String file) throws Exception {
        MessageDigest md = MessageDigest.getInstance("SHA1");
        FileInputStream input_file = new FileInputStream(file);
        byte[] data_bytes = new byte[1024];
        for (int i = 0; i < data_bytes.length && i < sign_header.length; ++i)
            data_bytes[i] = sign_header[i];
        int read = 0;
        int offset = sign_header.length;
        while ((read = input_file.read(data_bytes, offset, data_bytes.length - offset)) != -1) {
            md.update(data_bytes, 0, read);
            offset = 0;
        }
        input_file.close();
        return md.digest();
    }