<?php


namespace CubiStore\Web\Utils;

class ApkSignatureInfo
{
    /**
     * Which version of signature is used 1, 2, and 3 exist
     *  1. uses JAR Signing
     *  2. uses APK Signature Scheme
     *  3. extended APK Signature Scheme
     * @var int
     */
    public $version;
    public $signer;

    /**
     * As taken from the fdroidserver code:
     *
     *   This uses a strange algorithm that was devised at the very
     *   beginning of F-Droid.  Since it is only used for checking
     *   signature compatibility, it does not matter much that it uses MD5.
     *
     *   To get the same MD5 has that fdroidclient gets, we encode the .RSA
     *   certificate in a specific format and pass it hex-encoded to the
     *   md5 digest algorithm.  This is not the same as the standard X.509
     *   certificate fingerprint.
     *
     * @link https://gitlab.com/fdroid/fdroidserver/blob/master/fdroidserver/update.py#L418
     * @var string
     */
    public $fdroidSignerSignature;
}
