Remove dead object code

This change removes dead, unused code in core/objects.py. No other
changes are included.
This commit is contained in:
Peter Hamilton 2017-12-07 09:57:24 -05:00
parent 553ee285ac
commit 65bea78cad
1 changed files with 0 additions and 61 deletions

View File

@ -598,67 +598,6 @@ class KeyValue(Struct):
raise TypeError(msg) 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): class EncryptionKeyInformation(Struct):
""" """
A set of values detailing how an encrypted value was encrypted. A set of values detailing how an encrypted value was encrypted.