package
0.0.0-20200930173842-476b4f672e85
Repository: https://github.com/iotdomain/iotdomain-go.git
Documentation: pkg.go.dev
# Functions
CreateAsymKeys creates a asymmetric key set Returns a private key that contains its associated public key.
CreateEcdsaSignature creates a ECDSA256 signature from the payload using the provided private key This returns a base64url encoded signature.
CreateJWSSignature signs the payload using JSE ES256 and return the JSE compact serialized message.
DecryptMessage deserializes and decrypts the message using JWE This returns the decrypted message, or the input message if the message was not encrypted.
EncryptMessage encrypts and serializes the message using JWE.
NewDummyMessenger provides a messenger for messages that go no.where...
NewMessageSigner creates a new instance for signing and verifying published messages If getPublicKey is not provided, verification of signature is skipped.
NewMessenger creates a new messenger instance Create a messenger instance using configuration setting: "DummyMessenger" (default) MQTTMessenger, requires server, login and credentials properties set
config holds the messenger configuration.
NewMqttMessenger creates a new MQTT messenger instance.
PrivateKeyFromPem converts PEM encoded private keys into a ECDSA object for use in the application See also PrivateKeyToPem for the opposite.
PrivateKeyToPem converts a private key into their PEM encoded ascii format see also https://stackoverflow.com/questions/21322182/how-to-store-ecdsa-private-key-in-go.
PublicKeyFromPem converts a ascii encoded public key into a ECDSA public key.
PublicKeyToPem converts a public key into PEM encoded ascii format See also PublicKeyFromPem for its counterpart.
SignIdentity updates the base64URL encoded ECDSA256 signature of the public identity.
VerifyEcdsaSignature the payload using the base64url encoded signature and public key payload is any raw data signatureB64urlEncoded is the ecdsa 256 URL encoded signature Intended for signing an object like the publisher identity.
VerifyIdentitySignature verifies a base64URL encoded ECDSA256 signature in the identity against the identity itself using the sender's public key.
VerifyJWSMessage verifies a signed message and returns its payload The message is a JWS encoded string.
VerifySenderJWSSignature verifies if a message is JWS signed.
# Constants
ConnectionTimeoutSec constant with connection and reconnection timeouts.
TLSPort is the default secure port to connect to mqtt.
# Structs
DummyMessenger that implements IMessenger.
ECDSASignature ...
MessageSigner for signing and verifying of signed and encrypted messages.
MessengerConfig with configuration of a messenger.
MqttMessenger that implements IMessenger.
Subscription to messages.
TopicSubscription holds subscriptions to restore after disconnect.
# Interfaces
IMessenger interface for messenger implementations.