def outgoing(message, callback)

        # Allow non-data messages to pass through.
        return callback.call(message) if %r{^/meta/} =~ message['channel']

        message['ext'] ||= {}
        signature = OpenSSL::HMAC.digest('sha256', @key, message['data'])
        message['ext']['signature'] = Base64.encode64(signature)

        return callback.call(message)

      end
def outgoing(message, callback)

        # Allow non-data messages to pass through.
        return callback.call(message) if %r{^/meta/} =~ message['channel']

        message['ext'] ||= {}
        signature = OpenSSL::HMAC.digest('sha256', @key, message['data'])
        message['ext']['signature'] = Base64.encode64(signature)

        return callback.call(message)

      end
Initializes the signer with a secret key.
 @param [String] key        secret key, used to sign messages
 Adds a signature to every outgoing publish message.