_id stringlengths 2 7 | title stringlengths 1 88 | partition stringclasses 3
values | text stringlengths 75 19.8k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q270500 | Boolean.write | test | def write(self, ostream, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Write the encoding of the Boolean object to the output stream.
Args:
ostream (Stream): A buffer to contain the encoded bytes of a
Boolean object. Usually a BytearrayStream object. Required.
... | python | {
"resource": ""
} |
q270501 | Boolean.validate | test | def validate(self):
"""
Verify that the value of the Boolean object is valid.
Raises:
TypeError: if the value is not of type bool.
"""
if self.value:
if not isinstance(self.value, bool):
raise TypeError("expected: {0}, observed: {1}".forma... | python | {
"resource": ""
} |
q270502 | Interval.read | test | def read(self, istream, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Read the encoding of the Interval from the input stream.
Args:
istream (stream): A buffer containing the encoded bytes of the
value of an Interval. Usually a BytearrayStream object.
... | python | {
"resource": ""
} |
q270503 | Interval.validate | test | def validate(self):
"""
Verify that the value of the Interval is valid.
Raises:
TypeError: if the value is not of type int or long
ValueError: if the value cannot be represented by an unsigned
32-bit integer
"""
if self.value is not None:
... | python | {
"resource": ""
} |
q270504 | Key.key_wrapping_data | test | def key_wrapping_data(self):
"""
Retrieve all of the relevant key wrapping data fields and return them
as a dictionary.
"""
key_wrapping_data = {}
encryption_key_info = {
'unique_identifier': self._kdw_eki_unique_identifier,
'cryptographic_paramete... | python | {
"resource": ""
} |
q270505 | Key.key_wrapping_data | test | def key_wrapping_data(self, value):
"""
Set the key wrapping data attributes using a dictionary.
"""
if value is None:
value = {}
elif not isinstance(value, dict):
raise TypeError("Key wrapping data must be a dictionary.")
self._kdw_wrapping_metho... | python | {
"resource": ""
} |
q270506 | PublicKey.validate | test | def validate(self):
"""
Verify that the contents of the PublicKey object are valid.
Raises:
TypeError: if the types of any PublicKey attributes are invalid.
"""
if not isinstance(self.value, bytes):
raise TypeError("key value must be bytes")
elif ... | python | {
"resource": ""
} |
q270507 | SecretData.validate | test | def validate(self):
"""
Verify that the contents of the SecretData object are valid.
Raises:
TypeError: if the types of any SecretData attributes are invalid.
"""
if not isinstance(self.value, bytes):
raise TypeError("secret value must be bytes")
... | python | {
"resource": ""
} |
q270508 | OpaqueObject.validate | test | def validate(self):
"""
Verify that the contents of the OpaqueObject are valid.
Raises:
TypeError: if the types of any OpaqueObject attributes are invalid.
"""
if not isinstance(self.value, bytes):
raise TypeError("opaque value must be bytes")
eli... | python | {
"resource": ""
} |
q270509 | convert_attribute_name_to_tag | test | def convert_attribute_name_to_tag(value):
"""
A utility function that converts an attribute name string into the
corresponding attribute tag.
For example: 'State' -> enums.Tags.STATE
Args:
value (string): The string name of the attribute.
Returns:
enum: The Tags enumeration va... | python | {
"resource": ""
} |
q270510 | convert_attribute_tag_to_name | test | def convert_attribute_tag_to_name(value):
"""
A utility function that converts an attribute tag into the corresponding
attribute name string.
For example: enums.Tags.STATE -> 'State'
Args:
value (enum): The Tags enumeration value of the attribute.
Returns:
string: The attribut... | python | {
"resource": ""
} |
q270511 | get_bit_mask_from_enumerations | test | def get_bit_mask_from_enumerations(enumerations):
"""
A utility function that computes a bit mask from a collection of
enumeration values.
Args:
enumerations (list): A list of enumeration values to be combined in a
composite bit mask.
Returns:
int: The composite bit mas... | python | {
"resource": ""
} |
q270512 | get_enumerations_from_bit_mask | test | def get_enumerations_from_bit_mask(enumeration, mask):
"""
A utility function that creates a list of enumeration values from a bit
mask for a specific mask enumeration class.
Args:
enumeration (class): The enumeration class from which to draw
enumeration values.
mask (int): ... | python | {
"resource": ""
} |
q270513 | is_bit_mask | test | def is_bit_mask(enumeration, potential_mask):
"""
A utility function that checks if the provided value is a composite bit
mask of enumeration values in the specified enumeration class.
Args:
enumeration (class): One of the mask enumeration classes found in this
file. These include:
... | python | {
"resource": ""
} |
q270514 | CreateKeyPairRequestPayload.read | test | def read(self, input_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Read the data encoding the CreateKeyPair request payload and decode it
into its constituent parts.
Args:
input_buffer (stream): A data buffer containing encoded object
data, supporting... | python | {
"resource": ""
} |
q270515 | CreateKeyPairRequestPayload.write | test | def write(self, output_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Write the data encoding the CreateKeyPair request payload to a buffer.
Args:
output_buffer (stream): A data buffer in which to encode object
data, supporting a write method.
kmip... | python | {
"resource": ""
} |
q270516 | CreateKeyPairResponsePayload.read | test | def read(self, input_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Read the data encoding the CreateKeyPair response payload and decode it
into its constituent parts.
Args:
input_buffer (stream): A data buffer containing encoded object
data, supportin... | python | {
"resource": ""
} |
q270517 | CreateKeyPairResponsePayload.write | test | def write(self, output_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Write the data encoding the CreateKeyPair response payload to a buffer.
Args:
output_buffer (stream): A data buffer in which to encode object
data, supporting a write method.
kmi... | python | {
"resource": ""
} |
q270518 | GetAttributeListRequestPayload.read | test | def read(self, input_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Read the data encoding the GetAttributeList request payload and decode
it into its constituent parts.
Args:
input_buffer (stream): A data stream containing encoded object
data, support... | python | {
"resource": ""
} |
q270519 | GetAttributeListRequestPayload.write | test | def write(self, output_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Write the data encoding the GetAttributeList request payload to a
stream.
Args:
output_buffer (stream): A data stream in which to encode object
data, supporting a write method; usual... | python | {
"resource": ""
} |
q270520 | GetAttributeListResponsePayload.read | test | def read(self, input_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Read the data encoding the GetAttributeList response payload and
decode it into its constituent parts.
Args:
input_buffer (stream): A data stream containing encoded object
data, suppor... | python | {
"resource": ""
} |
q270521 | GetAttributeListResponsePayload.write | test | def write(self, output_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Write the data encoding the GetAttributeList response payload to a
stream.
Args:
output_buffer (stream): A data stream in which to encode object
data, supporting a write method; usua... | python | {
"resource": ""
} |
q270522 | get_json_files | test | def get_json_files(p):
"""
Scan the provided policy directory for all JSON policy files.
"""
f = [os.path.join(p, x) for x in os.listdir(p) if x.endswith(".json")]
return sorted(f) | python | {
"resource": ""
} |
q270523 | PolicyDirectoryMonitor.scan_policies | test | def scan_policies(self):
"""
Scan the policy directory for policy data.
"""
policy_files = get_json_files(self.policy_directory)
for f in set(policy_files) - set(self.policy_files):
self.file_timestamps[f] = 0
for f in set(self.policy_files) - set(policy_files... | python | {
"resource": ""
} |
q270524 | PolicyDirectoryMonitor.run | test | def run(self):
"""
Start monitoring operation policy files.
"""
self.initialize_tracking_structures()
if self.live_monitoring:
self.logger.info("Starting up the operation policy file monitor.")
while not self.halt_trigger.is_set():
time.sl... | python | {
"resource": ""
} |
q270525 | get_certificate_from_connection | test | def get_certificate_from_connection(connection):
"""
Extract an X.509 certificate from a socket connection.
"""
certificate = connection.getpeercert(binary_form=True)
if certificate:
return x509.load_der_x509_certificate(
certificate,
backends.default_backend()
... | python | {
"resource": ""
} |
q270526 | get_extended_key_usage_from_certificate | test | def get_extended_key_usage_from_certificate(certificate):
"""
Given an X.509 certificate, extract and return the extendedKeyUsage
extension.
"""
try:
return certificate.extensions.get_extension_for_oid(
x509.oid.ExtensionOID.EXTENDED_KEY_USAGE
).value
except x509.Exte... | python | {
"resource": ""
} |
q270527 | get_common_names_from_certificate | test | def get_common_names_from_certificate(certificate):
"""
Given an X.509 certificate, extract and return all common names.
"""
common_names = certificate.subject.get_attributes_for_oid(
x509.oid.NameOID.COMMON_NAME
)
return [common_name.value for common_name in common_names] | python | {
"resource": ""
} |
q270528 | get_client_identity_from_certificate | test | def get_client_identity_from_certificate(certificate):
"""
Given an X.509 certificate, extract and return the client identity.
"""
client_ids = get_common_names_from_certificate(certificate)
if len(client_ids) > 0:
if len(client_ids) > 1:
raise exceptions.PermissionDenied(
... | python | {
"resource": ""
} |
q270529 | CreateRequestPayload.read | test | def read(self, input_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Read the data encoding the Create request payload and decode it into
its constituent parts.
Args:
input_buffer (stream): A data buffer containing encoded object
data, supporting a read... | python | {
"resource": ""
} |
q270530 | CreateRequestPayload.write | test | def write(self, output_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Write the data encoding the Create request payload to a buffer.
Args:
output_buffer (stream): A data buffer in which to encode object
data, supporting a write method.
kmip_versio... | python | {
"resource": ""
} |
q270531 | CreateResponsePayload.read | test | def read(self, input_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Read the data encoding the Create response payload and decode it into
its constituent parts.
Args:
input_buffer (stream): A data buffer containing encoded object
data, supporting a rea... | python | {
"resource": ""
} |
q270532 | CreateResponsePayload.write | test | def write(self, output_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Write the data encoding the Create response payload to a buffer.
Args:
output_buffer (stream): A data buffer in which to encode object
data, supporting a write method.
kmip_versi... | python | {
"resource": ""
} |
q270533 | ObjectFactory.convert | test | def convert(self, obj):
"""
Convert a Pie object into a core secret object and vice versa.
Args:
obj (various): A Pie or core secret object to convert into the
opposite object space. Required.
Raises:
TypeError: if the object type is unrecognized... | python | {
"resource": ""
} |
q270534 | EncryptResponsePayload.read | test | def read(self, input_stream, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Read the data encoding the Encrypt response payload and decode it
into its constituent parts.
Args:
input_stream (stream): A data stream containing encoded object
data, supporting a re... | python | {
"resource": ""
} |
q270535 | DeriveKeyRequestPayload.read | test | def read(self, input_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Read the data encoding the DeriveKey request payload and decode it
into its constituent parts.
Args:
input_buffer (stream): A data stream containing encoded object
data, supporting a r... | python | {
"resource": ""
} |
q270536 | DeriveKeyRequestPayload.write | test | def write(self, output_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Write the data encoding the DeriveKey request payload to a stream.
Args:
output_buffer (stream): A data stream in which to encode object
data, supporting a write method; usually a BytearrayS... | python | {
"resource": ""
} |
q270537 | AttributePolicy.is_attribute_supported | test | def is_attribute_supported(self, attribute):
"""
Check if the attribute is supported by the current KMIP version.
Args:
attribute (string): The name of the attribute
(e.g., 'Cryptographic Algorithm'). Required.
Returns:
bool: True if the attribute... | python | {
"resource": ""
} |
q270538 | AttributePolicy.is_attribute_deprecated | test | def is_attribute_deprecated(self, attribute):
"""
Check if the attribute is deprecated by the current KMIP version.
Args:
attribute (string): The name of the attribute
(e.g., 'Unique Identifier'). Required.
"""
rule_set = self._attribute_rule_sets.get... | python | {
"resource": ""
} |
q270539 | AttributePolicy.is_attribute_applicable_to_object_type | test | def is_attribute_applicable_to_object_type(self, attribute, object_type):
"""
Check if the attribute is supported by the given object type.
Args:
attribute (string): The name of the attribute (e.g., 'Name').
Required.
object_type (ObjectType): An ObjectTy... | python | {
"resource": ""
} |
q270540 | AttributePolicy.is_attribute_multivalued | test | def is_attribute_multivalued(self, attribute):
"""
Check if the attribute is allowed to have multiple instances.
Args:
attribute (string): The name of the attribute
(e.g., 'State'). Required.
"""
# TODO (peterhamilton) Handle multivalue swap between c... | python | {
"resource": ""
} |
q270541 | ConfigHelper.get_valid_value | test | def get_valid_value(self, direct_value, config_section,
config_option_name, default_value):
"""Returns a value that can be used as a parameter in client or
server. If a direct_value is given, that value will be returned
instead of the value from the config file. If the ap... | python | {
"resource": ""
} |
q270542 | CheckResponsePayload.read | test | def read(self, input_stream, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Read the data encoding the Check response payload and decode it into
its constituent parts.
Args:
input_stream (stream): A data stream containing encoded object
data, supporting a read... | python | {
"resource": ""
} |
q270543 | CheckResponsePayload.write | test | def write(self, output_stream, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Write the data encoding the Check response payload to a stream.
Args:
output_stream (stream): A data stream in which to encode object
data, supporting a write method; usually a BytearrayStre... | python | {
"resource": ""
} |
q270544 | AttributeReference.read | test | def read(self, input_buffer, kmip_version=enums.KMIPVersion.KMIP_2_0):
"""
Read the data stream and decode the AttributeReference structure into
its parts.
Args:
input_buffer (stream): A data stream containing encoded object
data, supporting a read method.
... | python | {
"resource": ""
} |
q270545 | AttributeReference.write | test | def write(self, output_buffer, kmip_version=enums.KMIPVersion.KMIP_2_0):
"""
Write the AttributeReference structure encoding to the data stream.
Args:
output_buffer (stream): A data stream in which to encode
Attributes structure data, supporting a write method.
... | python | {
"resource": ""
} |
q270546 | Attributes.read | test | def read(self, input_stream, kmip_version=enums.KMIPVersion.KMIP_2_0):
"""
Read the data stream and decode the Attributes structure into its
parts.
Args:
input_stream (stream): A data stream containing encoded object
data, supporting a read method.
... | python | {
"resource": ""
} |
q270547 | Attributes.write | test | def write(self, output_stream, kmip_version=enums.KMIPVersion.KMIP_2_0):
"""
Write the Attributes structure encoding to the data stream.
Args:
output_stream (stream): A data stream in which to encode
Attributes structure data, supporting a write method.
k... | python | {
"resource": ""
} |
q270548 | Nonce.read | test | def read(self, input_stream, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Read the data encoding the Nonce struct and decode it into its
constituent parts.
Args:
input_stream (stream): A data stream containing encoded object
data, supporting a read method; u... | python | {
"resource": ""
} |
q270549 | Nonce.write | test | def write(self, output_stream, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Write the data encoding the Nonce struct to a stream.
Args:
output_stream (stream): A data stream in which to encode object
data, supporting a write method; usually a BytearrayStream
... | python | {
"resource": ""
} |
q270550 | UsernamePasswordCredential.read | test | def read(self, input_stream, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Read the data encoding the UsernamePasswordCredential struct and
decode it into its constituent parts.
Args:
input_stream (stream): A data stream containing encoded object
data, suppor... | python | {
"resource": ""
} |
q270551 | UsernamePasswordCredential.write | test | def write(self, output_stream, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Write the data encoding the UsernamePasswordCredential struct to a
stream.
Args:
output_stream (stream): A data stream in which to encode object
data, supporting a write method; usua... | python | {
"resource": ""
} |
q270552 | DeviceCredential.read | test | def read(self, input_stream, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Read the data encoding the DeviceCredential struct and decode it into
its constituent parts.
Args:
input_stream (stream): A data stream containing encoded object
data, supporting a rea... | python | {
"resource": ""
} |
q270553 | DeviceCredential.write | test | def write(self, output_stream, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Write the data encoding the DeviceCredential struct to a stream.
Args:
output_stream (stream): A data stream in which to encode object
data, supporting a write method; usually a BytearrayStr... | python | {
"resource": ""
} |
q270554 | Credential.read | test | def read(self, input_stream, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Read the data encoding the Credential struct and decode it into its
constituent parts.
Args:
input_stream (stream): A data stream containing encoded object
data, supporting a read meth... | python | {
"resource": ""
} |
q270555 | Credential.write | test | def write(self, output_stream, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Write the data encoding the Credential struct to a stream.
Args:
output_stream (stream): A data stream in which to encode object
data, supporting a write method; usually a BytearrayStream
... | python | {
"resource": ""
} |
q270556 | MACSignatureKeyInformation.read | test | def read(self, input_stream, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Read the data encoding the MACSignatureKeyInformation struct and
decode it into its constituent parts.
Args:
input_stream (stream): A data stream containing encoded object
data, suppor... | python | {
"resource": ""
} |
q270557 | MACSignatureKeyInformation.write | test | def write(self, output_stream, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Write the data encoding the MACSignatureKeyInformation struct to a
stream.
Args:
output_stream (stream): A data stream in which to encode object
data, supporting a write method; usua... | python | {
"resource": ""
} |
q270558 | KeyWrappingData.read | test | def read(self, input_stream, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Read the data encoding the KeyWrappingData struct and decode it into
its constituent parts.
Args:
input_stream (stream): A data stream containing encoded object
data, supporting a read... | python | {
"resource": ""
} |
q270559 | KeyWrappingData.write | test | def write(self, output_stream, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Write the data encoding the KeyWrappingData struct to a stream.
Args:
output_stream (stream): A data stream in which to encode object
data, supporting a write method; usually a BytearrayStre... | python | {
"resource": ""
} |
q270560 | KeyWrappingSpecification.read | test | def read(self, input_stream, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Read the data encoding the KeyWrappingSpecification struct and decode
it into its constituent parts.
Args:
input_stream (stream): A data stream containing encoded object
data, supporti... | python | {
"resource": ""
} |
q270561 | KeyWrappingSpecification.write | test | def write(self, output_stream, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Write the data encoding the KeyWrappingSpecification struct to a
stream.
Args:
output_stream (stream): A data stream in which to encode object
data, supporting a write method; usuall... | python | {
"resource": ""
} |
q270562 | ExtensionInformation.read | test | def read(self, istream, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Read the data encoding the ExtensionInformation object and decode it
into its constituent parts.
Args:
istream (Stream): A data stream containing encoded object data,
supporting a read meth... | python | {
"resource": ""
} |
q270563 | ExtensionInformation.write | test | def write(self, ostream, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Write the data encoding the ExtensionInformation object to a stream.
Args:
ostream (Stream): A data stream in which to encode object data,
supporting a write method; usually a BytearrayStream obje... | python | {
"resource": ""
} |
q270564 | ExtensionInformation.create | test | def create(cls, extension_name=None, extension_tag=None,
extension_type=None):
"""
Construct an ExtensionInformation object from provided extension
values.
Args:
extension_name (str): The name of the extension. Optional,
defaults to None.
... | python | {
"resource": ""
} |
q270565 | RevocationReason.read | test | def read(self, istream, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Read the data encoding the RevocationReason object and decode it
into its constituent parts.
Args:
istream (Stream): A data stream containing encoded object data,
supporting a read method; ... | python | {
"resource": ""
} |
q270566 | RevocationReason.write | test | def write(self, ostream, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Write the data encoding the RevocationReason object to a stream.
Args:
ostream (Stream): A data stream in which to encode object data,
supporting a write method; usually a BytearrayStream object.
... | python | {
"resource": ""
} |
q270567 | RevocationReason.validate | test | def validate(self):
"""
validate the RevocationReason object
"""
if not isinstance(self.revocation_code, RevocationReasonCode):
msg = "RevocationReaonCode expected"
raise TypeError(msg)
if self.revocation_message is not None:
if not isinstance(... | python | {
"resource": ""
} |
q270568 | ObjectDefaults.read | test | def read(self, input_buffer, kmip_version=enums.KMIPVersion.KMIP_2_0):
"""
Read the data encoding the ObjectDefaults structure and decode it into
its constituent parts.
Args:
input_buffer (stream): A data stream containing encoded object
data, supporting a re... | python | {
"resource": ""
} |
q270569 | ObjectDefaults.write | test | def write(self, output_buffer, kmip_version=enums.KMIPVersion.KMIP_2_0):
"""
Write the ObjectDefaults structure encoding to the data stream.
Args:
output_buffer (stream): A data stream in which to encode
Attributes structure data, supporting a write method.
... | python | {
"resource": ""
} |
q270570 | DefaultsInformation.read | test | def read(self, input_buffer, kmip_version=enums.KMIPVersion.KMIP_2_0):
"""
Read the data encoding the DefaultsInformation structure and decode it
into its constituent parts.
Args:
input_buffer (stream): A data stream containing encoded object
data, supporting... | python | {
"resource": ""
} |
q270571 | DefaultsInformation.write | test | def write(self, output_buffer, kmip_version=enums.KMIPVersion.KMIP_2_0):
"""
Write the DefaultsInformation structure encoding to the data stream.
Args:
output_buffer (stream): A data stream in which to encode
Attributes structure data, supporting a write method.
... | python | {
"resource": ""
} |
q270572 | RNGParameters.read | test | def read(self, input_buffer, kmip_version=enums.KMIPVersion.KMIP_1_3):
"""
Read the data encoding the RNGParameters structure and decode it
into its constituent parts.
Args:
input_buffer (stream): A data stream containing encoded object
data, supporting a rea... | python | {
"resource": ""
} |
q270573 | RNGParameters.write | test | def write(self, output_buffer, kmip_version=enums.KMIPVersion.KMIP_1_3):
"""
Write the RNGParameters structure encoding to the data stream.
Args:
output_buffer (stream): A data stream in which to encode
Attributes structure data, supporting a write method.
... | python | {
"resource": ""
} |
q270574 | ProfileInformation.read | test | def read(self, input_buffer, kmip_version=enums.KMIPVersion.KMIP_1_3):
"""
Read the data encoding the ProfileInformation structure and decode it
into its constituent parts.
Args:
input_buffer (stream): A data stream containing encoded object
data, supporting ... | python | {
"resource": ""
} |
q270575 | ProfileInformation.write | test | def write(self, output_buffer, kmip_version=enums.KMIPVersion.KMIP_1_3):
"""
Write the ProfileInformation structure encoding to the data stream.
Args:
output_buffer (stream): A data stream in which to encode
ProfileInformation structure data, supporting a write metho... | python | {
"resource": ""
} |
q270576 | ValidationInformation.write | test | def write(self, output_buffer, kmip_version=enums.KMIPVersion.KMIP_1_3):
"""
Write the ValidationInformation structure encoding to the data stream.
Args:
output_buffer (stream): A data stream in which to encode
ValidationInformation structure data, supporting a write... | python | {
"resource": ""
} |
q270577 | CapabilityInformation.read | test | def read(self, input_buffer, kmip_version=enums.KMIPVersion.KMIP_1_3):
"""
Read the data encoding the CapabilityInformation structure and decode
it into its constituent parts.
Args:
input_buffer (stream): A data stream containing encoded object
data, supporti... | python | {
"resource": ""
} |
q270578 | CapabilityInformation.write | test | def write(self, output_buffer, kmip_version=enums.KMIPVersion.KMIP_1_3):
"""
Write the CapabilityInformation structure encoding to the data stream.
Args:
output_buffer (stream): A data stream in which to encode
CapabilityInformation structure data, supporting a write... | python | {
"resource": ""
} |
q270579 | KmipServer.stop | test | def stop(self):
"""
Stop the server.
Halt server client connections and clean up any existing connection
threads.
Raises:
NetworkingError: Raised if a failure occurs while sutting down
or closing the TLS server socket.
"""
self._logge... | python | {
"resource": ""
} |
q270580 | KmipServer.serve | test | def serve(self):
"""
Serve client connections.
Begin listening for client connections, spinning off new KmipSessions
as connections are handled. Set up signal handling to shutdown
connection service as needed.
"""
self._socket.listen(5)
def _signal_handl... | python | {
"resource": ""
} |
q270581 | LocateRequestPayload.read | test | def read(self, input_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Read the data encoding the Locate request payload and decode it into
its constituent parts.
Args:
input_buffer (stream): A data buffer containing encoded object
data, supporting a read... | python | {
"resource": ""
} |
q270582 | LocateRequestPayload.write | test | def write(self, output_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Write the data encoding the Locate request payload to a buffer.
Args:
output_buffer (stream): A data buffer in which to encode object
data, supporting a write method.
kmip_versio... | python | {
"resource": ""
} |
q270583 | LocateResponsePayload.read | test | def read(self, input_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Read the data encoding the Locate response payload and decode it
into its constituent parts.
Args:
input_buffer (stream): A data buffer containing encoded object
data, supporting a rea... | python | {
"resource": ""
} |
q270584 | LocateResponsePayload.write | test | def write(self, output_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Write the data encoding the Locate response payload to a buffer.
Args:
output_buffer (stream): A data buffer in which to encode object
data, supporting a write method.
kmip_versi... | python | {
"resource": ""
} |
q270585 | CryptographyEngine.create_symmetric_key | test | def create_symmetric_key(self, algorithm, length):
"""
Create a symmetric key.
Args:
algorithm(CryptographicAlgorithm): An enumeration specifying the
algorithm for which the created key will be compliant.
length(int): The length of the key to be created. ... | python | {
"resource": ""
} |
q270586 | CryptographyEngine.create_asymmetric_key_pair | test | def create_asymmetric_key_pair(self, algorithm, length):
"""
Create an asymmetric key pair.
Args:
algorithm(CryptographicAlgorithm): An enumeration specifying the
algorithm for which the created keys will be compliant.
length(int): The length of the keys ... | python | {
"resource": ""
} |
q270587 | CryptographyEngine.mac | test | def mac(self, algorithm, key, data):
"""
Generate message authentication code.
Args:
algorithm(CryptographicAlgorithm): An enumeration specifying the
algorithm for which the MAC operation will use.
key(bytes): secret key used in the MAC operation
... | python | {
"resource": ""
} |
q270588 | CryptographyEngine.encrypt | test | def encrypt(self,
encryption_algorithm,
encryption_key,
plain_text,
cipher_mode=None,
padding_method=None,
iv_nonce=None,
hashing_algorithm=None):
"""
Encrypt data using symmetric or asymmetri... | python | {
"resource": ""
} |
q270589 | CryptographyEngine._encrypt_symmetric | test | def _encrypt_symmetric(
self,
encryption_algorithm,
encryption_key,
plain_text,
cipher_mode=None,
padding_method=None,
iv_nonce=None):
"""
Encrypt data using symmetric encryption.
Args:
encryption_al... | python | {
"resource": ""
} |
q270590 | CryptographyEngine._encrypt_asymmetric | test | def _encrypt_asymmetric(self,
encryption_algorithm,
encryption_key,
plain_text,
padding_method,
hashing_algorithm=None):
"""
Encrypt data using asymmetric encryptio... | python | {
"resource": ""
} |
q270591 | CryptographyEngine._decrypt_asymmetric | test | def _decrypt_asymmetric(
self,
decryption_algorithm,
decryption_key,
cipher_text,
padding_method,
hashing_algorithm=None):
"""
Encrypt data using asymmetric decryption.
Args:
decryption_algorithm (CryptographicA... | python | {
"resource": ""
} |
q270592 | CryptographyEngine._create_rsa_key_pair | test | def _create_rsa_key_pair(self, length, public_exponent=65537):
"""
Create an RSA key pair.
Args:
length(int): The length of the keys to be created. This value must
be compliant with the constraints of the provided algorithm.
public_exponent(int): The valu... | python | {
"resource": ""
} |
q270593 | CryptographyEngine.derive_key | test | def derive_key(self,
derivation_method,
derivation_length,
derivation_data=None,
key_material=None,
hash_algorithm=None,
salt=None,
iteration_count=None,
encryption_alg... | python | {
"resource": ""
} |
q270594 | CryptographyEngine._create_RSA_private_key | test | def _create_RSA_private_key(self,
bytes):
"""
Instantiates an RSA key from bytes.
Args:
bytes (byte string): Bytes of RSA private key.
Returns:
private_key
(cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKe... | python | {
"resource": ""
} |
q270595 | CryptographyEngine.verify_signature | test | def verify_signature(self,
signing_key,
message,
signature,
padding_method,
signing_algorithm=None,
hashing_algorithm=None,
digital_signature_alg... | python | {
"resource": ""
} |
q270596 | SignResponsePayload.read | test | def read(self, input_stream, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Read the data encoding the Sign response payload and decode it.
Args:
input_stream (stream): A data stream containing encoded object
data, supporting a read method; usually a BytearrayStream
... | python | {
"resource": ""
} |
q270597 | SignResponsePayload.write | test | def write(self, output_stream, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Write the data encoding the Sign response to a stream.
Args:
output_stream (stream): A data stream in which to encode object
data, supporting a write method; usually a BytearrayStream
... | python | {
"resource": ""
} |
q270598 | GetUsageAllocationRequestPayload.read | test | def read(self, input_stream, kmip_version=enums.KMIPVersion.KMIP_1_0):
"""
Read the data encoding the GetUsageAllocation request payload and
decode it into its constituent parts.
Args:
input_stream (stream): A data stream containing encoded object
data, suppo... | python | {
"resource": ""
} |
q270599 | protocol_version_to_kmip_version | test | def protocol_version_to_kmip_version(value):
"""
Convert a ProtocolVersion struct to its KMIPVersion enumeration equivalent.
Args:
value (ProtocolVersion): A ProtocolVersion struct to be converted into
a KMIPVersion enumeration.
Returns:
KMIPVersion: The enumeration equival... | python | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.