Versions in this module Expand all Collapse all v0 v0.40.4 May 19, 2022 Changes in this version + const B32CharEncoding + const B32EncodedKeyIdLen + const B32EncodedPubKeyLen + const JWKFileExtension + const JWTAlgHeader + const JWTKIDHeader + var B32CredsByteSet = set.NewByteSet([]byte(B32CharEncoding)) + var B32CredsEncoding = base32.NewEncoding(B32CharEncoding).WithPadding(base32.NoPadding) + var EmptyCreds = DoltCreds + var ErrBadB32CredsEncoding = errors.New("bad base32 credentials encoding") + var ErrCredsNotFound = errors.New("credentials not found") + func JWKCredSerialize(dc DoltCreds) ([]byte, error) + func JWKCredsWrite(wr io.Writer, dc DoltCreds) error + func JWKCredsWriteToDir(fs filesys.Filesys, dir string, dc DoltCreds) (string, error) + func PubKeyStrToKIDStr(pub string) (string, error) + func PubKeyToKID(pub []byte) []byte + func PubKeyToKIDStr(pub []byte) string + type DoltCreds struct + KeyID []byte + PrivKey []byte + PubKey []byte + func GenerateCredentials() (DoltCreds, error) + func JWKCredsDeserialize(data []byte) (DoltCreds, error) + func JWKCredsRead(rd io.Reader) (DoltCreds, error) + func JWKCredsReadFromFile(fs filesys.Filesys, path string) (DoltCreds, error) + func (dc DoltCreds) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error) + func (dc DoltCreds) HasPrivKey() bool + func (dc DoltCreds) IsPrivKeyValid() bool + func (dc DoltCreds) IsPubKeyValid() bool + func (dc DoltCreds) KeyIDBase32Str() string + func (dc DoltCreds) PrivKeyBase32Str() string + func (dc DoltCreds) PubKeyBase32Str() string + func (dc DoltCreds) RequireTransportSecurity() bool + func (dc DoltCreds) Sign(data []byte) []byte