Merge pull request #378 from OpenKMIP/feat/remove-dead-object-code

Remove dead object code
This commit is contained in:
Peter Hamilton 2017-12-08 10:01:14 -05:00 committed by GitHub
commit 637f358db7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 61 deletions

View File

@ -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.