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

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)
Validation function.  Converts a hex-64 encoded config value into
its original. Raises ConfigError on failure.

        def _parseHex(s):
    """Validation function.  Converts a hex-64 encoded config value into
       its original. Raises ConfigError on failure."""
    return _parseBase64(s,1)
        


src/m/i/mixminion-HEAD/lib/mixminion/ServerInfo.py   mixminion(Download)
            if len(lst) != 2:
                raise ConfigError("Missing URLBase or fingerprint in Voting-Server")
            digest = mixminion.Config._parseHex(lst[0]) # can raise ConfigError
            if len(digest) != DIGEST_LEN:
                raise ConfigError("Bad length for Voting-Server fingerprint",

src/m/i/mixminion-HEAD/lib/mixminion/test.py   mixminion(Download)
        self.assertEquals(C._parseBase64(" Y W\nJ j"), "abc")
        # Hex
        self.assertEquals(C._parseHex(" C0D0"), "\xC0\xD0")
        self.assertEquals(C._parseHex(" C0\n D 0"), "\xC0\xD0")
        # Date