func (a *AuthRequest) unsignedBuffer() *buffer.Buffer { b := buffer.Buffer{} b.AddBuffer(a.ChallengeBuffer) b.AddString(a.RequestUrl) b.AddString(a.Username) b.AddString(a.ServiceName) b.AddString(a.AuthMethod) b.AddString(a.SigningAlgorithm) // b.AddVarBytes(publicKeyBytes(a.PublicKey)) panic("todo") return &b }
// 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) }
// 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) }