Versions in this module Expand all Collapse all v1 v1.3.2 Mar 10, 2020 v1.3.1 Mar 10, 2020 Changes in this version + const AdminPerm + const ErrCodeAuthenticationFailed + const ErrCodeMaxAuthenticationAttempts + const ErrCodeMaxPeer + const ErrCodeNo + const ErrCodeTooManyAttempts + const ErrCodeUnknown + const ErrCodeUnknownPeer + const NonAdminPerm + const SRPGroup + const TagEncryptedData + const TagErrCode + const TagMFiCertificate + const TagPairingMethod + const TagPermission + const TagProof + const TagPublicKey + const TagSalt + const TagSequence + const TagSignature + const TagUsername + func HandleReaderForHandler(r io.Reader, h hap.ContainerHandler) (rOut io.Reader, err error) + func KeyDerivativeFuncRFC2945(h srp.HashFunc, username []byte) srp.KeyDerivationFunc + type PairMethodType byte + const PairingMethodAdd + const PairingMethodDefault + const PairingMethodDelete + const PairingMethodMFi + func (m PairMethodType) Byte() byte + func (m PairMethodType) String() string + type PairStepType byte + const PairStepKeyExchangeRequest + const PairStepKeyExchangeResponse + const PairStepStartRequest + const PairStepStartResponse + const PairStepVerifyRequest + const PairStepVerifyResponse + const PairStepWaiting + func (t PairStepType) Byte() byte + func (t PairStepType) String() string + type PairingController struct + func NewPairingController(database db.Database) *PairingController + func (c *PairingController) Handle(cont util.Container) (util.Container, error) + type SetupClientController struct + func NewSetupClientController(pin string, client hap.Device, database db.Database) *SetupClientController + func (setup *SetupClientController) Handle(in util.Container) (util.Container, error) + func (setup *SetupClientController) InitialPairingRequest() io.Reader + type SetupClientSession struct + EncryptionKey [32]byte + PrivateKey []byte + Proof []byte + PublicKey []byte + func NewSetupClientSession(username string, pin string) *SetupClientSession + func (s *SetupClientSession) GenerateKeys(salt []byte, otherPublicKey []byte) error + func (s *SetupClientSession) IsServerProofValid(proof []byte) bool + func (s *SetupClientSession) SetupEncryptionKey(salt []byte, info []byte) error + type SetupServerController struct + func NewSetupServerController(device hap.SecuredDevice, database db.Database) (*SetupServerController, error) + func (setup *SetupServerController) Handle(in util.Container) (out util.Container, err error) + type SetupServerSession struct + EncryptionKey [32]byte + PrivateKey []byte + PublicKey []byte + Salt []byte + Username []byte + func NewSetupServerSession(username, pin string) (*SetupServerSession, error) + func (p *SetupServerSession) ProofFromClientProof(clientProof []byte) ([]byte, error) + func (p *SetupServerSession) SetupEncryptionKey(salt []byte, info []byte) error + func (p *SetupServerSession) SetupPrivateKeyFromClientPublicKey(key []byte) error + type VerifyClientController struct + func NewVerifyClientController(client hap.Device, database db.Database) *VerifyClientController + func (verify *VerifyClientController) Handle(in util.Container) (util.Container, error) + func (verify *VerifyClientController) InitialKeyVerifyRequest() io.Reader + type VerifyServerController struct + func NewVerifyServerController(database db.Database, context hap.Context) *VerifyServerController + func (verify *VerifyServerController) Handle(in util.Container) (util.Container, error) + func (verify *VerifyServerController) SharedKey() [32]byte + type VerifySession struct + EncryptionKey [32]byte + OtherPublicKey [32]byte + PrivateKey [32]byte + PublicKey [32]byte + SharedKey [32]byte + func NewVerifySession() *VerifySession + func (s *VerifySession) GenerateSharedKeyWithOtherPublicKey(otherPublicKey [32]byte) + func (s *VerifySession) SetupEncryptionKey(salt []byte, info []byte) error + type VerifyStepType byte + const VerifyStepFinishRequest + const VerifyStepFinishResponse + const VerifyStepStartRequest + const VerifyStepStartResponse + const VerifyStepWaiting + func (t VerifyStepType) Byte() byte + func (t VerifyStepType) String() string