openGPMP
Open Source Mathematics Package
samples
python
cipher_ex.py
Go to the documentation of this file.
1
#!/usr/bin/python3
2
from
pygpmp
import
nt
3
4
5
def
main
():
6
c = nt.Cipher()
7
ciph = c.caesar(
"Plaintext"
, 5)
8
print(ciph)
9
10
ciph_1 = c.caesar(
"ATTACKATONCE"
, 4)
11
print(ciph_1)
12
13
text =
"Password"
14
shift =
"Computer"
15
encoded_text = c.keyword_encode(shift)
16
hashtext = c.keyword(text, encoded_text)
17
print(hashtext)
18
19
20
if
__name__ ==
"__main__"
:
21
main
()
python.cipher_ex.main
def main()
Definition:
cipher_ex.py:5
Generated by
1.9.1