Esempio n. 1
0
// WriteBuffer writes the public key to a buffer.
func (p *PublicKey) WriteBuffer(b *buffer.Buffer) {
	b.AddString(PUBLIC_KEY_TYPE)
	b.AddMPInt(big.NewInt(int64(p.E)))
	b.AddMPInt(p.N)
}
Esempio n. 2
0
// WriteBuffer writes the PartialKey to a buffer
func (k *PartialKey) WriteBuffer(b *buffer.Buffer) {
	b.AddString(KEY_TYPE)
	b.AddMPInt(big.NewInt(int64(k.E)))
	b.AddMPInt(k.N)
	b.AddMPInt(k.D)
}
Esempio n. 3
0
func (request *SignRequest) WriteBuffer(b *buffer.Buffer) {
	request.Key.WriteBuffer(b)
	b.AddMPInt(request.M)
}