Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
QuinnDamerell committed Aug 16, 2024
1 parent 799e62d commit 8814242
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion octoeverywhere/Proto/HandshakeAck.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,15 @@ def RsaChallengeResult(self) -> Optional[str]:
return self._tab.String(o + self._tab.Pos)
return None

# HandshakeAck
def RequiresRekey(self):
o = octoflatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18))
if o != 0:
return bool(self._tab.Get(octoflatbuffers.number_types.BoolFlags, o + self._tab.Pos))
return False

def HandshakeAckStart(builder: octoflatbuffers.Builder):
builder.StartObject(7)
builder.StartObject(8)

def Start(builder: octoflatbuffers.Builder):
HandshakeAckStart(builder)
Expand Down Expand Up @@ -139,6 +146,12 @@ def HandshakeAckAddRsaChallengeResult(builder: octoflatbuffers.Builder, rsaChall
def AddRsaChallengeResult(builder: octoflatbuffers.Builder, rsaChallengeResult: int):
HandshakeAckAddRsaChallengeResult(builder, rsaChallengeResult)

def HandshakeAckAddRequiresRekey(builder: octoflatbuffers.Builder, requiresRekey: bool):
builder.PrependBoolSlot(7, requiresRekey, 0)

def AddRequiresRekey(builder: octoflatbuffers.Builder, requiresRekey: bool):
HandshakeAckAddRequiresRekey(builder, requiresRekey)

def HandshakeAckEnd(builder: octoflatbuffers.Builder) -> int:
return builder.EndObject()

Expand Down

0 comments on commit 8814242

Please sign in to comment.