-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpicking.py
More file actions
27 lines (19 loc) · 815 Bytes
/
Copy pathpicking.py
File metadata and controls
27 lines (19 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import hashlib
from datetime import datetime
class ProdBlock:
def __init__(self, info, hash_previo, transaccion):
self.info = info
self.transaccion = transaccion
self.hash_previo = hash_previo
string_to_hash = "".join(transaccion) + hash_previo
self.block_hash = hashlib.sha256(string_to_hash.encode()).hexdigest()
class picking_class:
def __init__(self, picking, fecha_picking):
self.piking = picking
self.fecha_picking = fecha_picking
self.info = picking + ";" + fecha_picking
picking = (hashlib.sha256("packing".encode()).hexdigest())
fecha_picking = str(datetime.now())
item_picking = picking_class(picking, fecha_picking)
print("Picking:\n", item_picking.info)
embedded_data_picking = (item_picking.info)