mirror of
https://github.com/OpenKMIP/PyKMIP.git
synced 2025-07-23 14:04:33 +02:00
Fix code syntax and docs
This commit is contained in:
parent
e9a63e2659
commit
a664187bc4
@ -269,8 +269,7 @@ class CryptographyEngine(api.CryptographicEngine):
|
|||||||
)
|
)
|
||||||
cipher_algorithm = self._symmetric_key_algorithms.get(algorithm)
|
cipher_algorithm = self._symmetric_key_algorithms.get(algorithm)
|
||||||
try:
|
try:
|
||||||
# ARC4 and other non-block cipher algorithms will
|
# ARC4 and other non-block cipher algorithm will raise TypeError
|
||||||
# raise TypeError exceptions
|
|
||||||
c = cmac.CMAC(cipher_algorithm(key), backend=default_backend())
|
c = cmac.CMAC(cipher_algorithm(key), backend=default_backend())
|
||||||
c.update(data)
|
c.update(data)
|
||||||
mac_data = c.finalize()
|
mac_data = c.finalize()
|
||||||
|
@ -127,8 +127,8 @@ class KmipSession(threading.Thread):
|
|||||||
)
|
)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if hasattr(self._connection, 'shared_ciphers') \
|
if (hasattr(self._connection, 'shared_ciphers')
|
||||||
and self._connection.shared_ciphers() is not None:
|
and self._connection.shared_ciphers() is not None):
|
||||||
shared_ciphers = self._connection.shared_ciphers()
|
shared_ciphers = self._connection.shared_ciphers()
|
||||||
self._logger.debug(
|
self._logger.debug(
|
||||||
"Possible session ciphers: {0}".format(len(shared_ciphers))
|
"Possible session ciphers: {0}".format(len(shared_ciphers))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user