2021-08-14 15:50:49 +00:00
|
|
|
package kv
|
|
|
|
|
|
|
|
import "bytes"
|
|
|
|
|
|
|
|
// In order for an encoding to be Altair compatible, it must be prefixed with altair key.
|
|
|
|
func hasAltairKey(enc []byte) bool {
|
|
|
|
if len(altairKey) >= len(enc) {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
return bytes.Equal(enc[:len(altairKey)], altairKey)
|
|
|
|
}
|
2021-12-07 18:51:05 +00:00
|
|
|
|
2022-01-26 07:24:47 +00:00
|
|
|
func hasBellatrixKey(enc []byte) bool {
|
2022-01-10 16:47:30 +00:00
|
|
|
if len(bellatrixKey) >= len(enc) {
|
2021-12-07 18:51:05 +00:00
|
|
|
return false
|
|
|
|
}
|
2022-01-10 16:47:30 +00:00
|
|
|
return bytes.Equal(enc[:len(bellatrixKey)], bellatrixKey)
|
2021-12-07 18:51:05 +00:00
|
|
|
}
|
2022-05-03 16:55:59 +00:00
|
|
|
|
|
|
|
func hasBellatrixBlindKey(enc []byte) bool {
|
|
|
|
if len(bellatrixBlindKey) >= len(enc) {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
return bytes.Equal(enc[:len(bellatrixBlindKey)], bellatrixBlindKey)
|
|
|
|
}
|