INNER CODE UNIT · Python

BksKeyEntry

kurtbrose/pyjks · jks/bks.py:33

class BksKeyEntry(AbstractBksEntry):
    """
    Represents a non-encrypted cryptographic key (public, private or secret) stored in a BKS keystore.
    May exceptionally appear as a top-level entry type in (very) old keystores, but you are most likely
    to encounter these as the nested object inside a :class:`BksSealedKeyEntry` once decrypted.
    """
    def __init__(self, type, format, algorithm, encoded, **kwargs):
        super(BksKeyEntry, self).__init__(**kwargs)
        self.type = type
        """An integer indicating the type of key: one of :const:`KEY_TYPE_PRIVATE`, :const:`KEY_TYPE_PUBLIC`, :const:`KEY_TYPE_SECRET`."""
        self.format = format
        """A string indicating the format or encoding in which the key is stored. One of: ``PKCS8``, ``PKCS#8``, ``X.509``, ``X509``, ``RAW``."""
        self.algorithm = algorithm
        """A string indicating the algorithm for which the key is valid."""
        self.encoded = encoded
        """A byte string containing the key, formatted as indicated by the :attr:`format` attribute."""

        if self.type == KEY_TYPE_PRIVATE:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…