Closed steffen-kiess closed 8 months ago
so I was not sure whether I should create an enum for it.
I'm off two minds here, I think we should but as you've said there is already precedence where the etype has not been returned as an enum. I think for now let's just keep it like that and in the future we could change them all to be an IntEnum
. That way we can also investigate further whether or not that could break other things but AFAIK using IntEnum
is essentially a subtype of int
so should be ok.
I'm off two minds here, I think we should but as you've said there is already precedence where the etype has not been returned as an enum. I think for now let's just keep it like that and in the future we could change them all to be an
IntEnum
. That way we can also investigate further whether or not that could break other things but AFAIK usingIntEnum
is essentially a subtype ofint
so should be ok.
I've left it as an int
for now.
I also update the PR to use a named tuple.
This API contains another value (
enctype
) which could be done as an enum. Howeverenctype
values are already used in other places (KeyBlock.enctype
,kt_get_entry()
,kt_read_service_key()
,enctype_to_name()
andenctype_to_string()
,string_to_enctype()
), so I was not sure whether I should create an enum for it.