chore: Seperate code into multiple files for client and server.
This commit is contained in:
parent
a977e69aef
commit
a5e479cc0c
7 changed files with 230 additions and 188 deletions
26
server/typing.go
Normal file
26
server/typing.go
Normal file
|
@ -0,0 +1,26 @@
|
|||
package server
|
||||
|
||||
import (
|
||||
"net"
|
||||
|
||||
"github.com/ProtonMail/gopenpgp/v3/crypto"
|
||||
)
|
||||
|
||||
// Bismuth Server
|
||||
type BismuthServer struct {
|
||||
// Public key to use for transmission
|
||||
PublicKey *crypto.Key
|
||||
// Private key to use for transmission
|
||||
PrivateKey *crypto.Key
|
||||
|
||||
pgp *crypto.PGPHandle
|
||||
|
||||
// Algorithm to use for encryption (currently XChaCha20Poly1305 is the only option)
|
||||
SymmetricEncryptionAlgorithm int
|
||||
// Servers that are signing this server. If none, this server becomes self-signed
|
||||
// in the clients eyes
|
||||
SigningServers []string
|
||||
|
||||
// Called after a successful handshake & connection.
|
||||
HandleConnection func(conn net.Conn) error
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue