kafka-go: github.com/segmentio/kafka-go/sasl/scram Index | Files

package scram

import "github.com/segmentio/kafka-go/sasl/scram"


Package Files


func Mechanism Uses

func Mechanism(algo Algorithm, username, password string) (sasl.Mechanism, error)

Mechanism returns a new sasl.Mechanism that will use SCRAM with the provided Algorithm to securely transmit the provided credentials to Kafka.

SCRAM-SHA-256 and SCRAM-SHA-512 were added to Kafka in These mechanisms will not work with older versions.

type Algorithm Uses

type Algorithm interface {
    // Name returns the algorithm's name, e.g. "SCRAM-SHA-256"
    Name() string

    // Hash returns a new hash.Hash.
    Hash() hash.Hash

Algorithm determines the hash function used by SCRAM to protect the user's credentials.

var (
    SHA256 Algorithm = sha256Algo{}
    SHA512 Algorithm = sha512Algo{}

Package scram imports 6 packages (graph). Updated 2019-07-31. Refresh now. Tools for package owners.