From 65bea78cad075297538e0ce6cb020b12546038b0 Mon Sep 17 00:00:00 2001 From: Peter Hamilton Date: Thu, 7 Dec 2017 09:57:24 -0500 Subject: [PATCH] Remove dead object code This change removes dead, unused code in core/objects.py. No other changes are included. --- kmip/core/objects.py | 61 -------------------------------------------- 1 file changed, 61 deletions(-) diff --git a/kmip/core/objects.py b/kmip/core/objects.py index 82c4b18..2c35cbb 100644 --- a/kmip/core/objects.py +++ b/kmip/core/objects.py @@ -598,67 +598,6 @@ class KeyValue(Struct): raise TypeError(msg) -# 2.1.5 -class WrappingMethod(Enumeration): - - def __init__(self, value=None): - super(WrappingMethod, self).__init__( - enums.WrappingMethod, value, Tags.WRAPPING_METHOD) - - -class EncodingOption(Enumeration): - - def __init__(self, value=None): - super(EncodingOption, self).__init__( - enums.EncodingOption, value, Tags.ENCODING_OPTION) - - -class KeyInformation(Struct): - - def __init__(self, - unique_identifier=None, - cryptographic_parameters=None, - tag=Tags.ENCRYPTION_KEY_INFORMATION): - super(KeyInformation, self).__init__(tag=tag) - self.unique_identifier = unique_identifier - self.cryptographic_parameters = cryptographic_parameters - self.validate() - - def read(self, istream): - super(KeyInformation, self).read(istream) - tstream = BytearrayStream(istream.read(self.length)) - - self.unique_identifier = attributes.UniqueIdentifier() - self.unique_identifier.read(tstream) - - if self.is_tag_next(Tags.CRYPTOGRAPHIC_PARAMETERS, tstream): - self.cryptographic_parameters = CryptographicParameters() - self.cryptographic_parameters.read(tstream) - - self.is_oversized(tstream) - self.validate() - - def write(self, ostream): - tstream = BytearrayStream() - - self.unique_identifier.write(tstream) - - if self.cryptographic_parameters is not None: - self.cryptographic_parameters.write(tstream) - - # Write the length and value of the template attribute - self.length = tstream.length() - super(KeyInformation, self).write(ostream) - ostream.write(tstream.buffer) - - def validate(self): - self.__validate() - - def __validate(self): - # TODO (peter-hamilton) Finish implementation. - pass - - class EncryptionKeyInformation(Struct): """ A set of values detailing how an encrypted value was encrypted.