Task7_4.py 331 B

12345678910
  1. def sign(private_key,fileName):
  2. data=getData(fileName)
  3. data=data.encode("utf-8")
  4. start=timer()
  5. signature = private_key.sign(data,hashes.SHA256())
  6. end=timer()
  7. print("Time Taken to generate signature is ",(end-start))
  8. print("Time Taken per byte to sign is ",((end-start)/len(data)))
  9. return signature