MCPcopy Index your code
hub / github.com/HelloZeroNet/ZeroNet / update

Method update

src/lib/pyelliptic/cipher.py:55–62  ·  view source on GitHub ↗
(self, input)

Source from the content-addressed store, hash-verified

53 return OpenSSL.rand(cipher.get_blocksize())
54
55 def update(self, input):
56 i = OpenSSL.c_int(0)
57 buffer = OpenSSL.malloc(b"", len(input) + self.cipher.get_blocksize())
58 inp = OpenSSL.malloc(input, len(input))
59 if OpenSSL.EVP_CipherUpdate(self.ctx, OpenSSL.byref(buffer),
60 OpenSSL.byref(i), inp, len(input)) == 0:
61 raise Exception("[OpenSSL] EVP_CipherUpdate FAIL ...")
62 return buffer.raw[0:i.value]
63
64 def final(self):
65 i = OpenSSL.c_int(0)

Callers 3

cipheringMethod · 0.95
hash_160Function · 0.45
announceMethod · 0.45

Calls 2

mallocMethod · 0.80
get_blocksizeMethod · 0.45

Tested by

no test coverage detected