Documentation ¶
Index ¶
- Variables
- func B64truncate(rawMAC []byte, length int) string
- func EncodeKeyBase64(keyBytes []byte) string
- func EncodeSignatureSuffix(signatureForBody []byte, signatureForURL []byte) string
- func ExtractKeyAliasFromPublicKeyBase64(publicKeyBase64 string) string
- func ParseBase64EncodedKey(encodedKey string, length int) ([]byte, error)
- type AdsCertKeys
- type AdsCertPolicy
- type AuthenticatedConnectionSignature
- func (s *AuthenticatedConnectionSignature) AddParametersForSignature(fromKey string, to string, toKey string, timestamp string, nonce string) error
- func (s *AuthenticatedConnectionSignature) CompareSignatures(signatureForBody []byte, signatureForURL []byte) (bool, bool)
- func (s *AuthenticatedConnectionSignature) EncodeMessage() string
- func (s *AuthenticatedConnectionSignature) GetAttributeFrom() string
- func (s *AuthenticatedConnectionSignature) GetAttributeInvoking() string
- type ParsedPublicKey
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrParamMissingFrom = errors.New("parameter missing: from") ErrParamMissingFromKey = errors.New("parameter missing: fromKey") ErrParamMissingInvoking = errors.New("parameter missing: invoking") ErrParamMissingTo = errors.New("parameter missing: to") ErrParamMissingToKey = errors.New("parameter missing: toKey") ErrParamMissingTimestamp = errors.New("parameter missing: timestamp") ErrParamMissingNonce = errors.New("parameter missing: nonce") ErrParamMissingStatus = errors.New("parameter missing: status") ErrACSWrongNumParams = errors.New("wrong authenticated connection num params") )
View Source
var ( ErrEmptyInput = errors.New("empty input") ErrVersionPrefixOutOfOrder = errors.New("version prefix out of order") ErrVersionUnknown = errors.New("unknown version string") ErrVersionMissing = errors.New("missing version string or too many") ErrKeyAlgorithmWrongNumber = errors.New("key algorithm missing or too many") ErrHashAlgorithmWrongNumber = errors.New("hash algorithm missing or too many") ErrPublicKeysMissing = errors.New("public keys missing") ErrWrongKeySize = errors.New("wrong key size") ErrZeroValueKey = errors.New("zero-value key") ErrEmptyKey = errors.New("empty value for key") ErrUnsupportedAlgorithm = errors.New("unsupported key algorithm") ErrBase64DecodeFailure = errors.New("base64 decode failure") ErrPublicSuffixParseFailure = errors.New("public suffix parse failure") ErrNotTLDPlusOneDomain = errors.New("not a TLD plus one domain") )
Functions ¶
func B64truncate ¶
func EncodeKeyBase64 ¶
func EncodeSignatureSuffix ¶
Types ¶
type AdsCertKeys ¶
type AdsCertKeys struct {
PublicKeys []ParsedPublicKey
}
func DecodeAdsCertKeysRecord ¶
func DecodeAdsCertKeysRecord(keysRecord string) (*AdsCertKeys, error)
type AdsCertPolicy ¶
type AdsCertPolicy struct {
CanonicalCallsignDomain string
}
func DecodeAdsCertPolicyRecord ¶
func DecodeAdsCertPolicyRecord(input string) (*AdsCertPolicy, error)
type AuthenticatedConnectionSignature ¶
type AuthenticatedConnectionSignature struct {
// contains filtered or unexported fields
}
func DecodeAuthenticatedConnectionSignature ¶
func DecodeAuthenticatedConnectionSignature(encodedMessage string) (*AuthenticatedConnectionSignature, error)
func NewAuthenticatedConnectionSignature ¶
func NewAuthenticatedConnectionSignature(status string, from string, invoking string) (*AuthenticatedConnectionSignature, error)
func (*AuthenticatedConnectionSignature) AddParametersForSignature ¶
func (*AuthenticatedConnectionSignature) CompareSignatures ¶
func (s *AuthenticatedConnectionSignature) CompareSignatures(signatureForBody []byte, signatureForURL []byte) (bool, bool)
func (*AuthenticatedConnectionSignature) EncodeMessage ¶
func (s *AuthenticatedConnectionSignature) EncodeMessage() string
func (*AuthenticatedConnectionSignature) GetAttributeFrom ¶
func (s *AuthenticatedConnectionSignature) GetAttributeFrom() string
func (*AuthenticatedConnectionSignature) GetAttributeInvoking ¶
func (s *AuthenticatedConnectionSignature) GetAttributeInvoking() string
type ParsedPublicKey ¶
Click to show internal directories.
Click to hide internal directories.