Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
test_playfair.py
SUBMITTED BY:
siriarah
DATE:
Dec. 10, 2019, 3:02 p.m.
FORMAT:
Python 3
SIZE:
360 Bytes
Raw
Download
Tweet
HITS:
636
Go to comments
Report
import
sys
from
playfair
import
Playfair
versao
=
sys
.
version_info
[
0
]
if
versao
==
2
:
leitura
=
raw_input
elif
versao
==
3
:
leitura
=
input
txt_in
=
leitura
(
'Texto a ser cifrado: '
)
password
=
leitura
(
'Senha: '
)
cifra
=
Playfair
()
cifrado
=
cifra
.
encrypt
(
txt_in
,
password
)
print
(
cifrado
)
print
(
cifra
.
decrypt
(
cifrado
,
password
))
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus