mattosaurus / PgpCore

.NET Core class library for using PGP
MIT License
245 stars 98 forks source link

Refactor PGP class #241

Closed mattosaurus closed 1 year ago

mattosaurus commented 1 year ago

The PGP class is a bit of a beast and should probably be refactored. Potentially the best option is to split it into partial classes in line with the interfaces but I'm open to other options.

Liam-Rougoor commented 1 year ago

Do you mean, split PGP into partial class PGPes? An alternative could be to have separate classes that implement the necessary interfaces (for example, PGPEncrypter, PGPSigner etc.) and let PGP be a composite of those classes.

Main benefit is that main functionalities become more isolated, and can be tested and used in isolation if desired.

mattosaurus commented 1 year ago

Yep, that's what I meant but splitting out into separate classes as you suggest would also have the same effect so I'm happy with either approach.