esdb_pubsub_security (reckon_gater v1.1.2)
View SourceHMAC security utilities for reckon-gater PubSub
Provides message signing and verification for critical channels. Uses HMAC-SHA256 for message authentication.
Usage
Sign a message: SignedMsg = esdb_pubsub_security:sign(Message).
Verify a signed message: ok = esdb_pubsub_security:verify(SignedMsg).
Verify with explicit secret: ok = esdb_pubsub_security:verify(SignedMsg, Secret).
Summary
Functions
Get the configured HMAC secret
Set the HMAC secret
Sign a message map using the configured secret
Sign a message map using a specific secret
Verify a signed message using the configured secret
Verify a signed message using a specific secret
Functions
-spec get_secret() -> binary().
Get the configured HMAC secret
Set the HMAC secret
Sign a message map using the configured secret
Sign a message map using a specific secret
Verify a signed message using the configured secret
Verify a signed message using a specific secret