Docstring missing for
encode_point
37 y = int(y, 16)
38 return self.curve.point(x, y)
39
40 def encode_point(self, point):41 x = format(point.x, "x")
42 y = format(point.y, "x")
43 return f"{x},{y}"
Docstring missing for
decode_point
31 else:
32 raise ValueError("Invalid operation")
33
34 def decode_point(self, point):35 x, y = point.split(",")
36 x = int(x, 16)
37 y = int(y, 16)
Docstring missing for
perform_operation
13 public_key = private_key.public_key()
14 return private_key, public_key
15
16 def perform_operation(self, operation, params):17 if operation == "add":
18 point1 = self.decode_point(params["point1"])
19 point2 = self.decode_point(params["point2"])
Docstring missing for
generate_key_pair
8 self.curve = ec.SECP256K1()
9 self.backend = default_backend()
10
11 def generate_key_pair(self):12 private_key = ec.generate_private_key(self.curve, self.backend)
13 public_key = private_key.public_key()
14 return private_key, public_key
Description
The module/function docstring is missing.
If you want to ignore this, you can configure this in the .deepsource.toml
file. Please refer to docs for available options.