aboutsummaryrefslogtreecommitdiff
path: root/pyAggr3g470r.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyAggr3g470r.py')
-rw-r--r--pyAggr3g470r.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py
index 9bee7d7b..f91ac258 100644
--- a/pyAggr3g470r.py
+++ b/pyAggr3g470r.py
@@ -7,8 +7,8 @@ __date__ = "$Date: 2010/02/01 $"
__copyright__ = "Copyright (c) 2010 Cedric Bonhomme"
__license__ = "GPLv3"
-import base64
import sqlite3
+import hashlib
import cherrypy
import ConfigParser
@@ -141,8 +141,11 @@ class Root:
dic = {}
if list_of_articles is not None:
for article in list_of_articles:
- feed_id = base64.b64encode(article[5].encode('utf-8'))
- article_id = base64.b64encode(article[2].encode('utf-8'))
+ sha256_hash = hashlib.sha256()
+ sha256_hash.update(article[5].encode('utf-8'))
+ feed_id = sha256_hash.hexdigest()
+ sha256_hash.update(article[2].encode('utf-8'))
+ article_id = sha256_hash.hexdigest()
article_tuple = (article_id, article[0], article[1], article[2], article[3], article[4], article[5])
bgstack15