|
@ -45,6 +45,8 @@ enum IncludeNonce |
|
|
WithNonce = 1 |
|
|
WithNonce = 1 |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
static const unsigned NotPublic = (unsigned)-1; |
|
|
|
|
|
|
|
|
class Envelope |
|
|
class Envelope |
|
|
{ |
|
|
{ |
|
|
friend class Message; |
|
|
friend class Message; |
|
@ -64,7 +66,7 @@ public: |
|
|
Topic const& topic() const { return m_topic; } |
|
|
Topic const& topic() const { return m_topic; } |
|
|
bytes const& data() const { return m_data; } |
|
|
bytes const& data() const { return m_data; } |
|
|
|
|
|
|
|
|
Message open(Secret const& _s = Secret(), unsigned _topicIndex = (unsigned)-1) const; |
|
|
Message open(Secret const& _s, unsigned _topicIndex = NotPublic) const; |
|
|
|
|
|
|
|
|
unsigned workProved() const; |
|
|
unsigned workProved() const; |
|
|
void proveWork(unsigned _ms); |
|
|
void proveWork(unsigned _ms); |
|
@ -85,8 +87,6 @@ enum /*Message Flags*/ |
|
|
ContainsSignature = 1 |
|
|
ContainsSignature = 1 |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
static const unsigned NotPublic = (unsigned)-1; |
|
|
|
|
|
|
|
|
|
|
|
/// An (unencrypted) message, constructed from the combination of an Envelope, and, potentially,
|
|
|
/// An (unencrypted) message, constructed from the combination of an Envelope, and, potentially,
|
|
|
/// a Secret key to decrypt the Message.
|
|
|
/// a Secret key to decrypt the Message.
|
|
|
class Message |
|
|
class Message |
|
|