INNER CODE UNIT · Python
type2str
kurtbrose/pyjks · jks/bks.py:87
def type2str(cls, t):
"""
Returns a string representation of the given key type. Returns one of ``PRIVATE``, ``PUBLIC`` or ``SECRET``, or ``None``
if no such key type is known.
:param int t: Key type constant. One of :const:`KEY_TYPE_PRIVATE`, :const:`KEY_TYPE_PUBLIC`, :const:`KEY_TYPE_SECRET`.
"""
if t == KEY_TYPE_PRIVATE:
return "PRIVATE"
elif t == KEY_TYPE_PUBLIC:
return "PUBLIC"
elif t == KEY_TYPE_SECRET:
return "SECRET"
return None
class BksSecretKeyEntry(AbstractBksEntry): # TODO: consider renaming this to SecretValueEntry, since it's arbitrary secret data
"""