MOD: moving away from Exiv2, and towards my own binary code

This commit is contained in:
JohnE 2016-09-24 16:19:59 -07:00
parent f054bd2d0c
commit 9b9df9482e
4 changed files with 18 additions and 11 deletions

View File

@ -12,11 +12,15 @@
3) Digital Signature
a. generate new public keys
b. sign hash data with priv key
4) Write new PicSeal file
4) Write new PicSeal Public file
a. write encrypted original metadata
b. write PicSeal metadata
i. write JSON
b. write image data
5) Write new PicSeal Private file
a. create thumbnail (smaller files)
b. write PicSeal metadata (JSON)
c. write image data
[[ PicSeal Metadata ]]

View File

@ -1,6 +1,9 @@
#
# DEPRECATED
#
#
# ditching this for my own custom code
# uses GExiv2, and the C to Python bindings. but pain in the ass to install and config
# very limited read/wriging...cannot create a new application comment block. writing my own
import logging
import json
import gi

View File

@ -7,7 +7,6 @@ import logging
from shutil import copyfile
#from subprocess import Popen, PIPE, check_call
from libs.crypto_pub import Signature
from libs.img_exif import ImgExif
from libs.toolbox import Toolbox
from libs.jpg_tools import JpgTools
@ -34,17 +33,19 @@ def processImage(image_fn):
# add a digital signature to the metadata
def writePubImg(pub_fn, sig):
img = ImgExif(pub_fn)
img.addKey(sig.getPubKeyPEM())
img.addSig(sig.sig_data)
img.saveFile()
pass
# img = ImgExif(pub_fn)
# img.addKey(sig.getPubKeyPEM())
# img.addSig(sig.sig_data)
# img.saveFile()
#
def writePrivImg(priv_fn, sig):
img = ImgExif(priv_fn)
img.addKey(sig.getPrivKeyPEM())
pass
# img = ImgExif(priv_fn)
# img.addKey(sig.getPrivKeyPEM())
#img.addSig(sig.sig_data)
img.saveFile()
# img.saveFile()
#
def copyImage(image_fn):

View File

@ -1,5 +1,4 @@
Pillow==3.3.1
pycrypto==2.6.1
pygobject==3.20.1
requests==2.11.0
shellescape==3.4.1