Documentation ¶
Index ¶
- func CleanMessagesClientSide(messages []model.Message) []model.Message
- func CleanSingleMessageClientSide(message model.Message) model.Message
- func GetMessagesFrom(servers []string, path string) []model.Message
- func GetSingleMessageFromEachPod(servers []string, path string) model.Message
- func SignMessage(msg model.Message, secretKey string) (string, error)
- func SignStrings(secBase64, pubBase64, displayedName, message, messageId string) string
- func VerifyFromString(pub, sig, displayedName, msg, msgId string) bool
- type KeyGen
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanMessagesClientSide ¶ added in v0.8.5
CleanMessagesOutFromDB get data from DB and do some checks and verifications
func CleanSingleMessageClientSide ¶ added in v0.8.5
func GetSingleMessageFromEachPod ¶
Try to get a singl message from each pod specified
func SignMessage ¶ added in v0.9.0
SignMessage normalizes the message and signs it with `secretKey`
func SignStrings ¶ added in v0.9.0
SignMessage signs messages from base64 and return a base64 signature (empty string if the signature can't be generated) The signature contains these elements concatenated: The message (UTF-8 to bytes) The author's public key The author's declared name The eventual messageId, empty if this is an original post
func VerifyFromString ¶ added in v0.9.0
Types ¶
type KeyGen ¶ added in v0.8.5
type KeyGen struct { Pub string NewPub string ColorPrimary string // Preview of the primary color of generated key pair ColorSecondary string // Preview of the secondary color of generated key pair Sec string NewSec string Sig string DisplayedName string Content string MessageID string Verif bool Valid bool }
Click to show internal directories.
Click to hide internal directories.