mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-09 22:50:54 +00:00
Remove outdated comment
This commit is contained in:
@ -24,7 +24,6 @@ class RSAPublicKey(PublicKey):
|
|||||||
def verify(self, data: bytes, signature: bytes) -> bool:
|
def verify(self, data: bytes, signature: bytes) -> bool:
|
||||||
h = SHA256.new(data)
|
h = SHA256.new(data)
|
||||||
try:
|
try:
|
||||||
# NOTE: the typing in ``pycryptodome`` is wrong on the arguments to ``verify``.
|
|
||||||
pkcs1_15.new(self.impl).verify(h, signature)
|
pkcs1_15.new(self.impl).verify(h, signature)
|
||||||
except (ValueError, TypeError):
|
except (ValueError, TypeError):
|
||||||
return False
|
return False
|
||||||
@ -48,7 +47,6 @@ class RSAPrivateKey(PrivateKey):
|
|||||||
|
|
||||||
def sign(self, data: bytes) -> bytes:
|
def sign(self, data: bytes) -> bytes:
|
||||||
h = SHA256.new(data)
|
h = SHA256.new(data)
|
||||||
# NOTE: the typing in ``pycryptodome`` is wrong on the arguments to ``sign``.
|
|
||||||
return pkcs1_15.new(self.impl).sign(h)
|
return pkcs1_15.new(self.impl).sign(h)
|
||||||
|
|
||||||
def get_public_key(self) -> PublicKey:
|
def get_public_key(self) -> PublicKey:
|
||||||
|
|||||||
Reference in New Issue
Block a user