MCPcopy Index your code
hub / github.com/Bitmessage/PyBitmessage / encrypt

Method encrypt

src/pyelliptic/ecc.py:440–446  ·  view source on GitHub ↗

Encrypt data with ECIES method using the public key of the recipient.

(data, pubkey, ephemcurve=None, ciphername='aes-256-cbc')

Source from the content-addressed store, hash-verified

438
439 @staticmethod
440 def encrypt(data, pubkey, ephemcurve=None, ciphername='aes-256-cbc'):
441 """
442 Encrypt data with ECIES method using the public key of the recipient.
443 """
444 curve, pubkey_x, pubkey_y, i = ECC._decode_pubkey(pubkey)
445 return ECC.raw_encrypt(data, pubkey_x, pubkey_y, curve=curve,
446 ephemcurve=ephemcurve, ciphername=ciphername)
447
448 @staticmethod
449 def raw_encrypt(data, pubkey_x, pubkey_y, curve='sect283r1',

Callers 5

genAckPayloadFunction · 0.80
sendBroadcastMethod · 0.80
sendMsgMethod · 0.80
encryptFunction · 0.80

Calls 2

_decode_pubkeyMethod · 0.80
raw_encryptMethod · 0.80

Tested by

no test coverage detected