diff options
author | Rob Austein <sra@hactrn.net> | 2017-06-11 17:44:32 -0400 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2017-06-11 17:44:32 -0400 |
commit | c6b438e30990b92fe502493a3f3dba5b38b23ee4 (patch) | |
tree | a3abdd5111b6f459c4e67c3eb8212e97051e6b9d /cryptech/libhal.py | |
parent | 80a921caaef0e66904e5fae4527d334052319335 (diff) |
None is more Pythonic than "" as indicator for "no key"
Diffstat (limited to 'cryptech/libhal.py')
-rw-r--r-- | cryptech/libhal.py | 4 |
1 files changed, 3 insertions, 1 deletions
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: |