MCPcopy Create free account
hub / github.com/FreeOpcUa/python-opcua / encrypted_size

Method encrypted_size

opcua/common/connection.py:60–66  ·  view source on GitHub ↗
(self, plain_size)

Source from the content-addressed store, hash-verified

58 return obj
59
60 def encrypted_size(self, plain_size):
61 size = plain_size + self.security_policy.signature_size()
62 pbs = self.security_policy.plain_block_size()
63 if size % pbs != 0:
64 print("ENC", plain_size, size, pbs)
65 raise ua.UaError("Encryption error")
66 return size // pbs * self.security_policy.encrypted_block_size()
67
68 def to_binary(self):
69 security = struct_to_binary(self.SecurityHeader)

Callers 1

to_binaryMethod · 0.95

Calls 3

signature_sizeMethod · 0.45
plain_block_sizeMethod · 0.45
encrypted_block_sizeMethod · 0.45

Tested by

no test coverage detected