mirror of https://github.com/OpenKMIP/PyKMIP.git
Remove dead object code
This change removes dead, unused code in core/objects.py. No other changes are included.
This commit is contained in:
parent
553ee285ac
commit
65bea78cad
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue