Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2021-103
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2021-103
2021-103
Commits
10fb77e2
Commit
10fb77e2
authored
Nov 16, 2021
by
Karunathilake K. K. H. - IT18152456
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update final.py
parent
e5bff446
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
Main/final.py
Main/final.py
+15
-1
No files found.
Main/final.py
View file @
10fb77e2
...
...
@@ -97,4 +97,18 @@ def steg(passphrase, template, payload):
# Similarity Scorer
def
similarityScorer
(
refPayload
,
checkPayload
):
return
SequenceMatcher
(
None
,
refPayload
,
checkPayload
)
.
ratio
()
\ No newline at end of file
return
SequenceMatcher
(
None
,
refPayload
,
checkPayload
)
.
ratio
()
# Authentication
def
authenticate
(
checkPayload
,
refPayload
):
thresholdScore
=
0.889999
similarityScore
=
similarityScorer
(
refPayload
,
checkPayload
)
if
similarityScore
>=
thresholdScore
:
print
(
"Authentication Successful!"
)
else
:
print
(
"Unsuccessful Authentication!"
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment