Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(11)  |  Call(8)  |  Derive(0)  |  Import(3)
Return the 40-character fingerprint of public key 'key'.  This
is computed as the hex encoding of the SHA-1 digest of the
ASN.1 encoding of the public portion of key.

        def pk_fingerprint(key):
    """Return the 40-character fingerprint of public key 'key'.  This
       is computed as the hex encoding of the SHA-1 digest of the
       ASN.1 encoding of the public portion of key."""
    return binascii.b2a_hex(sha1(key.encode_key(1))).upper()
        


src/m/i/mixminion-HEAD/lib/mixminion/ServerInfo.py   mixminion(Download)
     formatBase64, formatDate, formatTime, readPossiblyGzippedFile
from mixminion.Config import ConfigError
from mixminion.Crypto import CryptoError, DIGEST_LEN, pk_check_signature, \
     pk_encode_public_key, pk_fingerprint, pk_sign, sha1
 
    def getKeyFingerprint(self):
        return pk_fingerprint(self['Signed-Directory']['Directory-Identity'])
 
    def checkSignature(self):
        if self.sigStatus is not None:

src/m/i/mixminion-HEAD/lib/mixminion/directory/DirMain.py   mixminion(Download)
     UIError
from mixminion.Config import ConfigError
from mixminion.Crypto import init_crypto, pk_fingerprint, pk_generate, \
     pk_PEM_load, pk_PEM_save
from mixminion.directory.Directory import Directory, DirectoryConfig
    d = getDirectory()
    key = d.getIdentity()
    print pk_fingerprint(key)
 
SUBCOMMANDS = { 'initialize' : cmd_init,

src/m/i/mixminion-HEAD/lib/mixminion/directory/DirFormats.py   mixminion(Download)
 
from mixminion.Config import ConfigError
from mixminion.Crypto import pk_sign, sha1, pk_encode_public_key, \
     pk_fingerprint
 
        # Remember server descs minimally to save room.
        sig = directory.getSignatures()[0]
        fp = pk_fingerprint(sig['Signed-Directory']['Directory-Identity'])
        serversByDir[fp] = []
        for s in directory.getAllServers():
 
    ident = sig['Signed-Directory']['Directory-Identity']
    keyid = mixminion.Crypto.pk_fingerprint(ident)
 
    # Do we recognize the signing key?

src/m/i/mixminion-HEAD/lib/mixminion/ClientDirectory.py   mixminion(Download)
            identity = directory['Signature']['DirectoryIdentity']
            fp = MIXMINION_DIRECTORY_FINGERPRINT #XXXX
            if fp and mixminion.Crypto.pk_fingerprint(identity) != fp:
                raise MixFatalError("Bad identity key on directory")
        else:

src/m/i/mixminion-HEAD/lib/mixminion/testSupport.py   mixminion(Download)
 
    print "   PK_Encode(K) =",hexStr(pk1.encode_key(1))
    print "   Fingerprint =",mixminion.Crypto.pk_fingerprint(pk1)
 
    print

src/m/i/mixminion-HEAD/lib/mixminion/test.py   mixminion(Download)
        # descriptors here.
        identity = getRSAKey(0,2048)
        fingerprint = Crypto.pk_fingerprint(identity)
        fname = getDirectory(
            [os.path.join(impdirname, s) for s in
    def loadDirectory(self, direc, d, now=None):
        identity = getRSAKey(0,2048)
        fingerprint = Crypto.pk_fingerprint(identity)
        fname = getDirectory(
            [os.path.join(d, s) for s in