Skip to content

Commit

Permalink
fix bad indent
Browse files Browse the repository at this point in the history
  • Loading branch information
jschlyter committed Dec 2, 2024
1 parent eed9fd5 commit b4c57de
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions jwcrypto/jwk.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,15 +370,15 @@ def generate_key(self, **params):

@classmethod
def generate_similar(cls, key):
return cls.generate(**key.get_generate_params())
return cls.generate(**key.get_generate_params())

def get_generate_params(self):
params = {param: self.get(param) for param in ["kty", "crv", "use", "key_ops"] if param in self}
if self.get("kty") == "RSA":
params["size"] = self._get_public_key().key_size
elif self.get("kty") == "oct":
params["size"] = len(base64url_decode(self.k)) * 8
return params
params = {param: self.get(param) for param in ["kty", "crv", "use", "key_ops"] if param in self}
if self.get("kty") == "RSA":
params["size"] = self._get_public_key().key_size
elif self.get("kty") == "oct":
params["size"] = len(base64url_decode(self.k)) * 8
return params

def _get_gen_size(self, params, default_size=None):
size = default_size
Expand Down

0 comments on commit b4c57de

Please sign in to comment.