Commit graph

9 commits

Author SHA1 Message Date
wussler
e65ed17b41
Refactor api (#6)
* Refactor library, remove duplicates

* Rebuild structure to use Messages and Signature models

* Use PGPSplitMessage

* Remove signature model

* Various fixes

* Add helpers with tests

* Fixes, add some docs, add tests

* Add attachment helpers

* Add helpers Symmetric encryption

* Edit docs + examples

* Rename kr to keyRing

* Various fixes for documentation

* Edit JSON handling functions, add decrypt keyring via token

* Add proposal changes doc

* Fix CI

* Drop *Message functions, join CleartextMessage and BinaryMessage

* Change canonicalization and trimming only to text signatures

* Add cleartextsignature, detach signature from message model, move helpers

* Documentation, remove optional parameters

* Move verification to separate model

* Don't return message in VerifyDetached

* Update table of contents in readme

* Appease golint

* Run go fmt

* Rename Encrypt/DecryptMessageWithPassword to ..WithToken

These functions shouldn't be used with user-provided passwords,
as they don't do any key-stretching.

* Change key generation usernames
2019-06-03 17:00:01 +02:00
Daniel Huigens
7d9930b8e0 Improve documentation and naming
- Rename pmmime to gomime
- Rename pmKeyObject to pgpKeyObject
2019-05-15 14:34:22 +02:00
Daniel Huigens
bb1be4a43b Rename PmCrypto to GopenPGP 2019-05-14 18:12:35 +02:00
Daniel Huigens
da2e0f77f0 Rename package to gopenpgp 2019-05-14 18:09:06 +02:00
Aron Wussler
b42e382224 Add signature tests, fix tests 2019-05-14 16:08:25 +00:00
Aron Wussler
78e3abb0d8 go vet and lint
* Naming
    * If this is not some OpenPGP standard I follow rule that `DES` should be
      upper case as it is abreviation and `Triple` should be camel-case as it
      is normal word hence `TripleDES`
    * rename `errors2` -> `errorsPGP`
* long lines
    * https://github.com/golang/go/wiki/CodeReviewComments#line-length
    * I bit improved long lines based on my folding
    * reuse type in definition if possible i.e. `a string, b string, c string` -> `a,b,c string`
    * `if long_statetent(); err!=nil {` -> `long_statement;↵ if err!=nil {`
    * spaces around operators (e.g. `a + b` -> `a+b`)
* removing empty lines on start and end of scope
* comments
    * on all exported functions
    * start with function name
* import:
    * order in alphabet
    * separate native, golang.org/x/ and our libs
2019-05-14 14:42:38 +00:00
William Gotti
e1098f7d34 refactor functions and merge in keyring 2019-05-14 08:07:49 +00:00
Aron Wussler
8af460ba61 Create key.go unit tests 2019-05-13 14:06:54 +00:00
Aron Wussler
56a73b1532 Add new key tests 2019-05-09 20:13:30 +02:00