From c6b438e30990b92fe502493a3f3dba5b38b23ee4 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Sun, 11 Jun 2017 17:44:32 -0400 Subject: None is more Pythonic than "" as indicator for "no key" --- cryptech/libhal.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cryptech/libhal.py b/cryptech/libhal.py index 39fa826..8666d15 100644 --- a/cryptech/libhal.py +++ b/cryptech/libhal.py @@ -534,7 +534,9 @@ class HSM(object): with self.rpc(RPC_FUNC_HASH_GET_ALGORITHM, handle) as r: return HALDigestAlgorithm.index[r.unpack_uint()] - def hash_initialize(self, alg, key = "", client = 0, session = 0, mixed_mode = None): + def hash_initialize(self, alg, key = None, client = 0, session = 0, mixed_mode = None): + if key is None: + key = "" if mixed_mode is None: mixed_mode = self.mixed_mode if mixed_mode: -- cgit v1.2.3