-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Breaking changes: - Renamed all callable functions: create, match, decode - Made function modules private, exposed functions via parent __init__ Other changes: - Major update of README.md - Refactored tests and other functionality to reflect renaming - Small renaming of badges: build -> ci, pypi release -> cd
- Loading branch information
Showing
10 changed files
with
134 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
from .decode_fingerprint import decode_fingerprint | ||
from .fingerprint_match import fingerprint_match | ||
from .json_fingerprint import json_fingerprint | ||
from ._create import create | ||
from ._decode import decode | ||
from ._match import match |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from ._decode import decode | ||
from ._create import create | ||
|
||
|
||
def match(input: str, target_fingerprint: str) -> bool: | ||
"""Match raw json str input to target fingerprint. | ||
Decodes the target fingerprint and creates a fingerprint from the input with identical parameters.""" | ||
version, hash_function, _ = decode(fingerprint=target_fingerprint) | ||
input_fingerprint = create(input=input, hash_function=hash_function, version=version) | ||
if input_fingerprint == target_fingerprint: | ||
return True | ||
return False |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.