rename the KeyPhase to KeyPhaseBit

This commit is contained in:
Marten Seemann
2019-06-29 15:32:11 +07:00
parent 7ba70cc8c2
commit 5a9c593463
10 changed files with 50 additions and 43 deletions

View File

@@ -0,0 +1,22 @@
package protocol
// KeyPhaseBit is the key phase bit
type KeyPhaseBit bool
const (
// KeyPhaseZero is key phase 0
KeyPhaseZero KeyPhaseBit = false
// KeyPhaseOne is key phase 1
KeyPhaseOne KeyPhaseBit = true
)
func (p KeyPhaseBit) String() string {
if p == KeyPhaseZero {
return "0"
}
return "1"
}
func (p KeyPhaseBit) Next() KeyPhaseBit {
return !p
}