Skip to content

Commit

Permalink
Add properties
Browse files Browse the repository at this point in the history
  • Loading branch information
mccoyp committed Sep 11, 2023
1 parent 029399c commit 12c8c2c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/cryptography/hazmat/primitives/asymmetric/padding.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ def __init__(

self._salt_length = salt_length

@property
def mgf(self) -> MGF:
return self._mgf


class OAEP(AsymmetricPadding):
name = "EME-OAEP"
Expand All @@ -73,6 +77,14 @@ def __init__(
self._algorithm = algorithm
self._label = label

@property
def algorithm(self) -> hashes.HashAlgorithm:
return self._algorithm

@property
def mgf(self) -> MGF:
return self._mgf


class MGF(metaclass=abc.ABCMeta):
_algorithm: hashes.HashAlgorithm
Expand Down

0 comments on commit 12c8c2c

Please sign in to comment.