]> git.apps.os.sepia.ceph.com Git - fscrypt.git/commit
actions: generate a config file for fscrypt
authorJoe Richey joerichey@google.com <joerichey@google.com>
Wed, 24 May 2017 01:57:13 +0000 (18:57 -0700)
committerJoe Richey joerichey@google.com <joerichey@google.com>
Wed, 31 May 2017 19:41:30 +0000 (12:41 -0700)
commita14724d335a87c3f7a12f7f0837cfc01ec995b82
treee07adb93c5ef912be98f861a139acf924235a946
parentf4f4f606718497a2f660cdb737b812e035f55311
actions: generate a config file for fscrypt

This commit adds in the actions package. This package will be the
highest-level interface to the fscrypt packages. The public functions
in this package will be called directly from cmd/fscrypt.

The actions added in this commit pertain to creating and reading the
fscrypt global config file "fscrypt.conf". The challenging part about
creating this file is finding the correct hashing parameters for the
desired time target.

The getHashingCosts() function finds the desired costs by doubling the
costs and running the passphrase hash until the target is exceeded.
Then, a cost estimate is obtained using a linear interpolation between
the last two costs (and their time results).

Change-Id: I4a0eaf4856ec4ff49eb4360da3267f7caa9d07b2
actions/config.go [new file with mode: 0644]
actions/config_test.go [new file with mode: 0644]
actions/context.go [new file with mode: 0644]
actions/context_test.go [new file with mode: 0644]