コード例 #1
0
func NewPopulatedRatchetState_SavedKeys_MessageKey(r randyRatchet, easy bool) *RatchetState_SavedKeys_MessageKey {
	this := &RatchetState_SavedKeys_MessageKey{}
	this.Num = r.Uint32()
	this.Key = github_com_andres_erbsen_chatterbox_proto.NewPopulatedByte32(r)
	this.CreationTime = r.Int63()
	if r.Intn(2) == 0 {
		this.CreationTime *= -1
	}
	this.AuthPrivate = github_com_andres_erbsen_chatterbox_proto.NewPopulatedByte32(r)
	if !easy && r.Intn(10) != 0 {
		this.XXX_unrecognized = randUnrecognizedRatchet(r, 5)
	}
	return this
}
コード例 #2
0
func NewPopulatedRatchetState_SavedKeys(r randyRatchet, easy bool) *RatchetState_SavedKeys {
	this := &RatchetState_SavedKeys{}
	this.HeaderKey = github_com_andres_erbsen_chatterbox_proto.NewPopulatedByte32(r)
	if r.Intn(10) != 0 {
		v3 := r.Intn(10)
		this.MessageKeys = make([]RatchetState_SavedKeys_MessageKey, v3)
		for i := 0; i < v3; i++ {
			v4 := NewPopulatedRatchetState_SavedKeys_MessageKey(r, easy)
			this.MessageKeys[i] = *v4
		}
	}
	if !easy && r.Intn(10) != 0 {
		this.XXX_unrecognized = randUnrecognizedRatchet(r, 4)
	}
	return this
}
コード例 #3
0
func NewPopulatedRatchetState(r randyRatchet, easy bool) *RatchetState {
	this := &RatchetState{}
	this.RootKey = github_com_andres_erbsen_chatterbox_proto.NewPopulatedByte32(r)
	this.OurRatchetPrivate = github_com_andres_erbsen_chatterbox_proto.NewPopulatedByte32(r)
	this.TheirRatchetPublic = github_com_andres_erbsen_chatterbox_proto.NewPopulatedByte32(r)
	this.Ratchet = bool(r.Intn(2) == 0)
	this.SendHeaderKey = github_com_andres_erbsen_chatterbox_proto.NewPopulatedByte32(r)
	this.RecvHeaderKey = github_com_andres_erbsen_chatterbox_proto.NewPopulatedByte32(r)
	this.NextSendHeaderKey = github_com_andres_erbsen_chatterbox_proto.NewPopulatedByte32(r)
	this.NextRecvHeaderKey = github_com_andres_erbsen_chatterbox_proto.NewPopulatedByte32(r)
	this.SendChainKey = github_com_andres_erbsen_chatterbox_proto.NewPopulatedByte32(r)
	this.RecvChainKey = github_com_andres_erbsen_chatterbox_proto.NewPopulatedByte32(r)
	this.SendCount = r.Uint32()
	this.RecvCount = r.Uint32()
	this.PrevSendCount = r.Uint32()
	this.PrevAuthPrivate = github_com_andres_erbsen_chatterbox_proto.NewPopulatedByte32(r)
	this.OurAuthPrivate = github_com_andres_erbsen_chatterbox_proto.NewPopulatedByte32(r)
	this.TheirAuthPublic = github_com_andres_erbsen_chatterbox_proto.NewPopulatedByte32(r)
	if r.Intn(10) != 0 {
		v1 := r.Intn(10)
		this.SavedKeys = make([]RatchetState_SavedKeys, v1)
		for i := 0; i < v1; i++ {
			v2 := NewPopulatedRatchetState_SavedKeys(r, easy)
			this.SavedKeys[i] = *v2
		}
	}
	if !easy && r.Intn(10) != 0 {
		this.XXX_unrecognized = randUnrecognizedRatchet(r, 18)
	}
	return this
}