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

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)

src/b/i/Bitlaw-HEAD/src/bitlawui/pyelliptic/ecc.py   Bitlaw(Download)
        iv = OpenSSL.rand(OpenSSL.get_cipher(ciphername).get_blocksize())
        ctx = Cipher(key_e, iv, 1, ciphername)
        ciphertext = ctx.ciphering(data)
        mac = hmac_sha256(key_m, ciphertext)
        return iv + pubkey + ciphertext + mac
            raise RuntimeError("Fail to verify data")
        ctx = Cipher(key_e, iv, 0, ciphername)
        return ctx.ciphering(ciphertext)