Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMailioCrypto ¶
func NewMailioCrypto() *mailioCrytoType
Types ¶
type MailioCrypto ¶
type MailioCrypto interface { // Convert a public key in base64 format into a mailio address PublicKeyToMailioAddress(publicKeyBase64 string) (*string, error) // checks if mailio address is in expected format IsValidMailioAddress(address string) bool // create a server side handshake message (signed by server keys where public key is published to DNS) Handshake() // Verify any handshake message VerifyHandshake() // Generated ed25519 signing key pair and returns base64 public key, private key GenerateKeyPair() (*string, *string, error) // Sign message using ed25519 Sign(message []byte, privateKeyBase64 string) ([]byte, error) // Verify message signature using ed25519 Verify(message []byte, signature []byte, publicKeyBase64 string) (bool, error) // Encode a specific content to bytes using cbor (https://github.com/fxamacker/cbor) CborEncode(payload interface{}) ([]byte, error) }
Click to show internal directories.
Click to hide internal directories.