(self, cfg: Settings)
| 15 | |
| 16 | class HashService: |
| 17 | def __init__(self, cfg: Settings) -> None: |
| 18 | self.cfg = cfg |
| 19 | self.jwt_public_key = base64.b64decode(cfg.jwt_public_key).decode("utf-8") |
| 20 | self.jwt_private_key = base64.b64decode(cfg.jwt_private_key).decode("utf-8") |
| 21 | self.jwt_algorithm = cfg.jwt_algorithm |
| 22 | if self.jwt_algorithm is None or self.jwt_algorithm == "": |
| 23 | self.jwt_algorithm = "RS256" |
| 24 | self.hasher = PasswordHasher() |
| 25 | |
| 26 | def verify_x_api_key(self, key: str) -> bool: |
| 27 | return self.verify_hash(key, self.cfg.x_api_key) |
nothing calls this directly
no outgoing calls
no test coverage detected