Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Key ¶
type Key struct {
// contains filtered or unexported fields
}
func FromURLSafe ¶
FromURLSafe - converting web key representation for key back to native key
func NewKeyAutoID ¶
func NewKeyAutoID() *Key
NewKeyAutoID creates a table reference with auto generated ID
func (*Key) Bytes ¶
Bytes returns key in bytes including the parentId (key must have id before it has Parent)
type KeyConfig ¶
type KeyConfig struct { Pub string `json:"pub"` Priv string `json:"priv"` PubC string `json:"pubC"` PrivC string `json:"privC"` Domain string `json:"domain"` SecretKey string `json:"secretKey"` // contains filtered or unexported fields }
KeyConfig for JSON Configuration file (stored under home folder .dtable)
type MCrypt ¶
type MCrypt struct { SignPrivKey crypt.PrivKey SignPubKey crypt.PubKey EncPrivKey crypt.PrivCKey EncPubKey crypt.PubCKey // contains filtered or unexported fields }
func GenerateRandomKeys ¶
* * Generates a new file with random encryption keys *
func NewMCrypt ¶
* * Main class implementing ed25519 cruve25519 and aes256/aes512 encrrytion algorithms *
func (*MCrypt) CreateHandshake ¶
* * ! this method should not be used server side. It's mainly to validate VerifyHandshake and for completeness sake * The handshakes are always created client side (check mobile SDK or Javascript SDK) * Creates base64 encoded signature of the contract content *
func (*MCrypt) VerifyMailioHandshake ¶
func (mc *MCrypt) VerifyMailioHandshake(handshakeOwnersPublicKey, handshakeSignature, handshakeContract string) (bool, error)
* * Handshake signature validation * Handshake is a signed contract by the users private key * Contract can be: * - stringified json file * - user address (e.g. mailio address) * - Id reference to a unique public/private contract *