func (pub *PublicKey) HexString() string {
	return pub.v.getString(16)
}
HexString returns the hex string representation of a public key.
package bls
import "C"
import "fmt"
import "unsafe"
import "log"
var bazel = "no"
func init() {
	if bazel != "true" {
		panic("this library must be built by bazel, but was not")
	}
	if err := initializeBLS(BLS12_381); err != nil {
		log.Fatalf("Could not initialize BLS12-381 curve: %v", err)
	}
}
func initializeBLS(curve int) error {
	err := C.blsInit(C.int(curve), C.MCLBN_COMPILED_TIME_VAR)
	if err != 0 {
		return fmt.Errorf("ERR Init curve=%d", curve)
	}
	return nil
}
type SecretKey struct {
	v fr
}
func (sec *SecretKey) getPointer() (p *C.blsSecretKey) {
	return (*C.blsSecretKey)(unsafe.Pointer(sec))
}
func (sec *SecretKey) LittleEndian() []byte {
	return sec.v.serialize()
}
func (sec *SecretKey) SetLittleEndian(buf []byte) error {
	return sec.v.setLittleEndian(buf)
}
func (sec *SecretKey) SerializeToHexStr() string {
	return sec.v.getString(IoSerializeHexStr)
}
func (sec *SecretKey) DeserializeHexStr(s string) error {
	return sec.v.setString(s, IoSerializeHexStr)
}
func (sec *SecretKey) HexString() string {
	return sec.v.getString(16)
}
func (sec *SecretKey) DecString() string {
	return sec.v.getString(10)
}
func (sec *SecretKey) SetHexString(s string) error {
	return sec.v.setString(s, 16)
}
func (sec *SecretKey) SetDecString(s string) error {
	return sec.v.setString(s, 10)
}
func (sec *SecretKey) IsEqual(rhs *SecretKey) bool {
	return sec.v.isEqual(&rhs.v)
}
func (sec *SecretKey) SetValue(val int64) {
	sec.v.setInt64(val)
}
func (sec *SecretKey) SetByCSPRNG() {
	sec.v.setByCSPRNG()
}
func (sec *SecretKey) Add(rhs *SecretKey) {
	frAdd(&sec.v, &sec.v, &rhs.v)
}
func (sec *SecretKey) GetMasterSecretKey(k int) (msk []SecretKey) {
	msk = make([]SecretKey, k)
	msk[0] = *sec
	for i := 1; i < k; i++ {
		msk[i].SetByCSPRNG()
	}
	return msk
}
func GetMasterPublicKey(msk []SecretKey) (mpk []PublicKey) {
	n := len(msk)
	mpk = make([]PublicKey, n)
	for i := 0; i < n; i++ {
		mpk[i] = *msk[i].GetPublicKey()
	}
	return mpk
}
type PublicKey struct {
	v g2
}
func (pub *PublicKey) getPointer() (p *C.blsPublicKey) {
	return (*C.blsPublicKey)(unsafe.Pointer(pub))
}
func (pub *PublicKey) Serialize() []byte {
	return pub.v.serialize()
}
func (pub *PublicKey) Deserialize(buf []byte) error {
	return pub.v.deserialize(buf)
}
func (pub *PublicKey) SerializeToHexStr() string {
	return pub.v.getString(IoSerializeHexStr)
}
func (pub *PublicKey) DeserializeHexStr(s string) error {
	return pub.v.setString(s, IoSerializeHexStr)
}