Skip to content
Snippets Groups Projects
Commit eac9db5c authored by Jonah Husson's avatar Jonah Husson
Browse files

Update comments

parent e3837851
No related branches found
No related tags found
3 merge requests!510Release,!229Make the payload returned by NewSizedBroadcast include the extra padding so...,!207WIP: Client Restructure
...@@ -30,6 +30,8 @@ func (bc *broadcastClient) MaxAsymmetricPayloadSize() int { ...@@ -30,6 +30,8 @@ func (bc *broadcastClient) MaxAsymmetricPayloadSize() int {
// BroadcastAsymmetric broadcasts the payload to the channel. Requires a healthy network state to send // BroadcastAsymmetric broadcasts the payload to the channel. Requires a healthy network state to send
// Payload must be equal to bc.MaxAsymmetricPayloadSize, and the channel PrivateKey must be passed in // Payload must be equal to bc.MaxAsymmetricPayloadSize, and the channel PrivateKey must be passed in
// Broadcast method must be set to asymmetric // Broadcast method must be set to asymmetric
// When a payload is sent, it is split into partitons of size bc.channel.MaxAsymmetricPayloadSize
// which are each encrypted using multicastRSA
func (bc *broadcastClient) BroadcastAsymmetric(pk multicastRSA.PrivateKey, payload []byte, cMixParams cmix.CMIXParams) ( func (bc *broadcastClient) BroadcastAsymmetric(pk multicastRSA.PrivateKey, payload []byte, cMixParams cmix.CMIXParams) (
id.Round, ephemeral.Id, error) { id.Round, ephemeral.Id, error) {
if bc.param.Method != Asymmetric { if bc.param.Method != Asymmetric {
......
...@@ -26,12 +26,13 @@ type ListenerFunc func(payload []byte, ...@@ -26,12 +26,13 @@ type ListenerFunc func(payload []byte,
receptionID receptionID.EphemeralIdentity, round rounds.Round) receptionID receptionID.EphemeralIdentity, round rounds.Round)
type Channel interface { type Channel interface {
// MaxSymmetricPayloadSize returns the maximum size for a symmetric broadcasted payload. // MaxSymmetricPayloadSize returns the maximum size for a symmetric broadcast payload.
MaxSymmetricPayloadSize() int MaxSymmetricPayloadSize() int
// MaxAsymmetricPayloadSize returns the maximum size for an asymmetric broadcasted payload. // MaxAsymmetricPayloadSize returns the maximum size for an asymmetric broadcast payload.
MaxAsymmetricPayloadSize() int MaxAsymmetricPayloadSize() int
// Get returns the underlying crypto.Channel
Get() crypto.Channel Get() crypto.Channel
// Broadcast broadcasts the payload to the channel. The payload size must be // Broadcast broadcasts the payload to the channel. The payload size must be
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment