@@ -924,59 +924,6 @@ proc selectBest*(order: int, p1, p2: string): string =
924
924
if felement == selement:
925
925
return felement
926
926
927
- proc createProposal * (nonce, pubkey: openArray [byte ],
928
- exchanges, ciphers, hashes: string ): seq [byte ] =
929
- # # Create SecIO proposal message using random ``nonce``, local public key
930
- # # ``pubkey``, comma-delimieted list of supported exchange schemes
931
- # # ``exchanges``, comma-delimeted list of supported ciphers ``ciphers`` and
932
- # # comma-delimeted list of supported hashes ``hashes``.
933
- var msg = initProtoBuffer ({WithUint32BeLength })
934
- msg.write (1 , nonce)
935
- msg.write (2 , pubkey)
936
- msg.write (3 , exchanges)
937
- msg.write (4 , ciphers)
938
- msg.write (5 , hashes)
939
- msg.finish ()
940
- msg.buffer
941
-
942
- proc decodeProposal * (message: seq [byte ], nonce, pubkey: var seq [byte ],
943
- exchanges, ciphers, hashes: var string ): bool =
944
- # # Parse incoming proposal message and decode remote random nonce ``nonce``,
945
- # # remote public key ``pubkey``, comma-delimieted list of supported exchange
946
- # # schemes ``exchanges``, comma-delimeted list of supported ciphers
947
- # # ``ciphers`` and comma-delimeted list of supported hashes ``hashes``.
948
- # #
949
- # # Procedure returns ``true`` on success and ``false`` on error.
950
- var pb = initProtoBuffer (message)
951
- let r1 = pb.getField (1 , nonce)
952
- let r2 = pb.getField (2 , pubkey)
953
- let r3 = pb.getField (3 , exchanges)
954
- let r4 = pb.getField (4 , ciphers)
955
- let r5 = pb.getField (5 , hashes)
956
-
957
- r1.get (false ) and r2.get (false ) and r3.get (false ) and
958
- r4.get (false ) and r5.get (false )
959
-
960
- proc createExchange * (epubkey, signature: openArray [byte ]): seq [byte ] =
961
- # # Create SecIO exchange message using ephemeral public key ``epubkey`` and
962
- # # signature of proposal blocks ``signature``.
963
- var msg = initProtoBuffer ({WithUint32BeLength })
964
- msg.write (1 , epubkey)
965
- msg.write (2 , signature)
966
- msg.finish ()
967
- msg.buffer
968
-
969
- proc decodeExchange * (message: seq [byte ],
970
- pubkey, signature: var seq [byte ]): bool =
971
- # # Parse incoming exchange message and decode remote ephemeral public key
972
- # # ``pubkey`` and signature ``signature``.
973
- # #
974
- # # Procedure returns ``true`` on success and ``false`` on error.
975
- var pb = initProtoBuffer (message)
976
- let r1 = pb.getField (1 , pubkey)
977
- let r2 = pb.getField (2 , signature)
978
- r1.get (false ) and r2.get (false )
979
-
980
927
# # Serialization/Deserialization helpers
981
928
982
929
proc write * (vb: var VBuffer , pubkey: PublicKey ) {.
0 commit comments