File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,5 +2,7 @@ __pycache__/
22piencrypt.egg-info /
33web /data.py
44piencrypt /__pycache__ /
5+ piencrypt /data.py
56Helper /
6- Test /__pycache__ /
7+ Test /__pycache__ /
8+ Test /data.py
Original file line number Diff line number Diff line change 1+ from data import pie_hash
2+
13class PiEncrypt :
24
35 def __init__ (self , loc ):
@@ -13,13 +15,13 @@ def get_data(self):
1315 def hide_data (self , data ):
1416 self .data = data
1517 with open (self .loc , 'ab' ) as f :
16- f .write (bytes ("HERE" + self .data , encoding = "ascii" ))
18+ f .write (bytes (pie_hash + self .data , encoding = "ascii" ))
1719
1820 # read the hidden data from the picture
1921 def read_data (self ):
2022 with open (self .loc , 'rb' ) as f :
2123 content = f .read ()
22- list = content .split (b'HERE' )
24+ list = content .split (bytes ( pie_hash , encoding = "ascii" ) )
2325 # print(f.read())
2426 return list [1 ].decode ("utf-8" )
2527
You can’t perform that action at this time.
0 commit comments