MCPcopy Create free account
hub / github.com/data61/MP-SPDZ / check

Method check

Compiler/instructions_base.py:949–955  ·  view source on GitHub ↗
(cls, arg)

Source from the content-addressed store, hash-verified

947
948 @classmethod
949 def check(cls, arg):
950 if not isinstance(arg, str):
951 raise ArgumentError(arg, 'Argument is not string')
952 if len(arg) > cls.length:
953 raise ArgumentError(arg, 'String longer than %d' % cls.length)
954 if '\0' in arg:
955 raise ArgumentError(arg, 'String contains zero-byte')
956
957 @classmethod
958 def encode(cls, arg):

Callers 5

get_bytesMethod · 0.45
checkMethod · 0.45
checkMethod · 0.45
checkMethod · 0.45
check_argsMethod · 0.45

Calls 1

ArgumentErrorClass · 0.85

Tested by

no test coverage detected