func (e *Entity) Serialize(w io.Writer) error {
	err := e.PrimaryKey.Serialize(w)
	if err != nil {
		return err
	}
	for _, ident := range e.Identities {
		err = ident.UserId.Serialize(w)
		if err != nil {
			return err
		}
		err = ident.SelfSignature.Serialize(w)
		if err != nil {
			return err
		}
		for _, sig := range ident.Signatures {
			err = sig.Serialize(w)
			if err != nil {
				return err
			}
		}
	}
	for _, subkey := range e.Subkeys {
		err = subkey.PublicKey.Serialize(w)
		if err != nil {
			return err
		}
		err = subkey.Sig.Serialize(w)
		if err != nil {
			return err
		}
	}
	return nil
}
// Serialize writes the public part of the given Entity to w, including
// signatures from other entities. No private key material will be output.
Serialize writes the public part of the given Entity to w, including
signatures from other entities. No private key material will be output.
// Serialize writes the public part of the given Entity to w including // signatures from other entities . No private key material will be output .
func (e *Entity) Serialize(w io.Writer) error {
	err := e.PrimaryKey.Serialize(w)
	if err != nil {
		return err
	}
	for _, ident := range e.Identities {
		err = ident.UserId.Serialize(w)
		if err != nil {
			return err
		}
		err = ident.SelfSignature.Serialize(w)
		if err != nil {
			return err
		}
		for _, sig := range ident.Signatures {
			err = sig.Serialize(w)
			if err != nil {
				return err
			}
		}
	}
	for _, subkey := range e.Subkeys {
		err = subkey.PublicKey.Serialize(w)
		if err != nil {
			return err
		}
		err = subkey.Sig.Serialize(w)
		if err != nil {
			return err
		}
	}
	return nil
}
func ( e * Entity ) Serialize ( w io . Writer ) error { err := e . PrimaryKey . Serialize ( w ) if err != nil { return err } for _ , ident := range e . Identities { err = ident . UserId . Serialize ( w ) if err != nil { return err } err = ident . SelfSignature . Serialize ( w ) if err != nil { return err } for _ , sig := range ident . Signatures { err = sig . Serialize ( w ) if err != nil { return err } } } for _ , subkey := range e . Subkeys { err = subkey . PublicKey . Serialize ( w ) if err != nil { return err } err = subkey . Sig . Serialize ( w ) if err != nil { return err } } return nil }
Serialize writes the public part of the given Entity to w, including
signatures from other entities.
Serialize writes the public part of the given Entity to w including signatures from other entities .