Commit Graph

5 Commits

Author SHA1 Message Date
Gustav Simonsson 1f8290ca44 Add ImportPreSaleKey
* ImportPreSaleKey takes a KeyStore, a presale key JSON (e.g. file content)
  and a password string. It stores the key in the given key store.
* Refactored common AES decryption and moved some functions to crypto.go
2015-01-21 16:35:43 +01:00
Gustav Simonsson 3cf038f300 Address pull request comments
* Allocate with composite literal instead of new
* Remove check of number of bytes read from rand
2015-01-19 20:24:30 +01:00
Gustav Simonsson 47d3b3dd58 Address pull request comments
* Remove flags field from key struct
* Change JSON struct fields from string to []byte
* Change GenerateNewKey API to take io.Reader for random source
* Remove mixing entropy source function
* Use testing Fatal in tests
2015-01-15 19:40:10 +01:00
Gustav Simonsson a1c2749380 Address pull request comments
* Simplify scrypt constants with const block
* Add key store constructors and make their types private
* Simplify key store and file namings to be less Java Enterprise™
* Change test error logging to use t.Error(err)
* Reduce number of naked returns (just like my ex-gf)
* Simplify file reading path code
2015-01-15 19:40:10 +01:00
Gustav Simonsson 945798f913 Add new key_store interface and two new key stores
* Add new generic key_store interface
* Add new plaintext key store storing unprotected keys on disk
* Add new encrypted key store storing encrypted keys on disk
* Add new entropy mixing function using OS and go runtime sources
2015-01-15 19:40:10 +01:00