func (e *EncryptedAuctionOrder) Serialize() (raw []byte, err error) {
	var b bytes.Buffer

	// register the rsw puzzle and hashtimelock puzzle
	gob.Register(new(rsw.PuzzleRSW))

	// register the hashtimelock (puzzle and timelock are same thing)
	gob.Register(new(hashtimelock.HashTimelock))

	// register the puzzle interface
	gob.RegisterName("puzzle", new(crypto.Puzzle))

	// register the encrypted auction order interface with gob
	gob.RegisterName("order", new(EncryptedAuctionOrder))

	// create a new encoder writing to our buffer
	enc := gob.NewEncoder(&b)

	// encode the encrypted auction order in the buffer
	if err = enc.Encode(e); err != nil {
		err = fmt.Errorf("Error encoding encrypted auction order :%s", err)
		return
	}

	// Get the bytes finally
	raw = b.Bytes()

	return
}
// Serialize serializes the encrypted order using gob
Serialize serializes the encrypted order using gob
// Serialize serializes the encrypted order using gob
func (e *EncryptedAuctionOrder) Serialize() (raw []byte, err error) {
	var b bytes.Buffer
	gob.Register(new(rsw.PuzzleRSW))
	gob.Register(new(hashtimelock.HashTimelock))
	gob.RegisterName("puzzle", new(crypto.Puzzle))
	gob.RegisterName("order", new(EncryptedAuctionOrder))
	enc := gob.NewEncoder(&b)
	if err = enc.Encode(e); err != nil {
		err = fmt.Errorf("Error encoding encrypted auction order :%s", err)
		return
	}
	raw = b.Bytes()
	return
}
func ( e * EncryptedAuctionOrder ) Serialize ( ) ( raw [ ] byte , err error ) { var b bytes . Buffer gob . Register ( new ( rsw . PuzzleRSW ) ) gob . Register ( new ( hashtimelock . HashTimelock ) ) gob . RegisterName ( " " , new ( crypto . Puzzle ) ) gob . RegisterName ( " " , new ( EncryptedAuctionOrder ) ) enc := gob . NewEncoder ( & b ) if err = enc . Encode ( e ) ; err != nil { err = fmt . Errorf ( " " , err ) return } raw = b . Bytes ( ) return }
Serialize serializes the encrypted order using gob
Serialize serializes the encrypted order using gob
// register the rsw puzzle and hashtimelock puzzle // register the hashtimelock (puzzle and timelock are same thing) // register the puzzle interface // register the encrypted auction order interface with gob // create a new encoder writing to our buffer // encode the encrypted auction order in the buffer // Get the bytes finally