Commit graph

92 commits

Author SHA1 Message Date
Daniel Huigens
e4814f20a6 Merge branch 'linter' into 'master'
Add Linter

See merge request ProtonMail/go-pm-crypto!13
2019-05-14 14:42:38 +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
Daniel Huigens
e03fe86077 Merge branch 'fix/sym-password-incorrect' into 'master'
Don't loop forever when passed an incorrect password

See merge request ProtonMail/go-pm-crypto!19
2019-05-14 13:34:42 +00:00
Daniel Huigens
b1e3bd78d1 Don't loop forever when passed an incorrect password 2019-05-14 13:34:42 +00:00
Daniel Huigens
1f0d0c98f6 Merge branch 'examples' into 'master'
Add example skeleton to readme

See merge request ProtonMail/go-pm-crypto!16
2019-05-14 08:07:57 +00:00
Aron Wussler
354d846e79 Add example skeleton to readme 2019-05-14 08:07:56 +00:00
Daniel Huigens
d465cd8535 Merge branch 'renamefunc' into 'master'
refactor functions and merge in keyring

See merge request ProtonMail/go-pm-crypto!15
2019-05-14 08:07:49 +00:00
William Gotti
e1098f7d34 refactor functions and merge in keyring 2019-05-14 08:07:49 +00:00
Daniel Huigens
ef2f0e8340 Merge branch 'tests' into 'master'
Create key.go unit tests

See merge request ProtonMail/go-pm-crypto!10
2019-05-13 14:06:54 +00:00
Aron Wussler
8af460ba61 Create key.go unit tests 2019-05-13 14:06:54 +00:00
Daniel Huigens
9240e5d86a Merge branch 'fix/unused-code' into 'master'
Remove unused code + handle errors

See merge request ProtonMail/go-pm-crypto!12
2019-05-13 12:42:29 +00:00
William Gotti
b820c14c1a Remove unused code + handle errors 2019-05-13 12:42:29 +00:00
Daniel Huigens
e797299d64 Merge branch 'improve-doc' into 'master'
fix typo / improve documentatation

See merge request ProtonMail/go-pm-crypto!11
2019-05-13 12:33:01 +00:00
William Gotti
5cdec38a18 fix typo / improve documentatation 2019-05-13 12:33:01 +00:00
Daniel Huigens
701dc26ab5 Clean up README.md 2019-05-13 13:45:24 +02:00
Jakub
9b75197da8 fix rsa type 2019-05-10 12:53:48 +02:00
Jakub
532ce66247 found TODO while patching android 2019-05-10 08:08:03 +02:00
Aron Wussler
56a73b1532 Add new key tests 2019-05-09 20:13:30 +02:00
Aron Wussler
c9730189a7 Add code coverage to CI 2019-05-09 18:57:27 +02:00
Aron Wussler
fd27ec08fb Fix existing tests, move large constants to files 2019-05-09 18:19:14 +02:00
Jakub Cuth
5a5fe05f53 Merge branch 'fix/new-go-crypto' into 'master'
Fix for new go crypto

See merge request ProtonMail/go-pm-crypto!9
2019-05-01 15:47:17 +00:00
Jakub
388b564874 try ssh key for access 2019-05-01 17:35:39 +02:00
Jakub
2eea06b104 add glide 2019-05-01 16:53:29 +02:00
Jakub
8a907114c0 add ci 2019-05-01 16:39:04 +02:00
Jakub
21fe53fd5d update glide and add ci 2019-05-01 16:35:49 +02:00
Daniel Huigens
2091fc106c Use new KeyExpired function 2019-04-27 07:32:20 +02:00
Daniel Huigens
ea2fcb9438 Handle encrypt error in EncryptAttachment 2019-04-27 07:32:20 +02:00
Jakub
99c48c2e4e fix crash on missing keyring 2019-03-07 17:39:34 +01:00
Jakub
968888eb0e change error message pmapi -> pm-crypto 2019-03-07 17:03:16 +01:00
Jakub
36b497d591 fix compile 2019-03-07 16:56:12 +01:00
Jakub
35a4e32efb fix mime 2019-03-07 16:02:53 +01:00
Jakub
37459ffa7b first key id 2019-03-07 15:15:35 +01:00
Jakub
6cadeb5b28 update crypto and mime 2019-03-07 14:46:09 +01:00
Jakub
a92113e341 format and comment 2019-03-07 14:23:38 +01:00
Jakub
398de10777 changes 2019-03-07 14:11:41 +01:00
Jakub
8f4bbfc780 return decrypt error 2019-03-07 14:08:17 +01:00
Jakub
79a677eb2c rebase 2019-03-07 13:48:45 +01:00
Jakub
f1bd6f0fa1 Merge branch 'master' of gitlab.protontech.ch:ProtonMail/go-pm-crypto 2019-03-07 13:41:57 +01:00
Sunny
96eb15dc68 Merge branch 'sessionkey-error-handling' into 'master'
Fix error handling in GetSessionFromKeyPacket*

See merge request ProtonMail/go-pm-crypto!7
2019-02-05 16:18:31 +00:00
Daniel Huigens
ffa2d06073 Fix error handling in GetSessionFromKeyPacket* 2019-02-05 17:11:30 +01:00
Jakub Lehotsky
b218f523af Methods use + unit tests update 2019-01-11 00:23:00 +01:00
Jakub
09d519e51e force memory release in golang/crypto 2019-01-07 13:51:48 +01:00
Jakub Cuth
ec2deeb892 Merge branch 'feat/scrypt-cost-param' into 'feat/pmapi-crypto-refactoring'
Parameterize cost factor N of scrypt

See merge request ProtonMail/go-pm-crypto!6
2019-01-07 12:42:14 +00:00
Jakub Lehotsky
1ac42ecce1 Merge branch 'feat/pmapi-crypto-refactoring' of https://gitlab.protontech.ch/ProtonMail/go-pm-crypto into feat/pmapi-crypto-refactoring 2019-01-07 12:39:02 +01:00
Jakub Lehotsky
39f5b3af18 Method from go-pmapi merge 2019-01-07 12:36:57 +01:00
Daniel Huigens
102d7c2d5f Parameterize cost factor N of scrypt 2018-12-19 11:52:52 -05:00
Jakub Lehotsky
9567fb840d Merge branch 'feat/symmetric-aes-encryption' into 'feat/pmapi-crypto-refactoring'
Add symmetric AES encryption functions

See merge request ProtonMail/go-pm-crypto!4
2018-12-05 13:08:17 +00:00
Daniel Huigens
9c0a78e7e2 Add symmetric AES encryption functions 2018-12-03 15:08:04 +01:00
Jakub Lehotsky
ffa226acbd Minor: iOS building target name 2018-11-22 10:56:56 +01:00
Jakub Lehotsky
d7f0550a4b Low-memory garbage collector 2018-11-22 10:53:14 +01:00