Lock simple-scrypt library to master branch

The master branch includes a fix for i386, otherwise the calibration
panics. See https://github.com/restic/restic/issues/676 for details.
This commit is contained in:
Alexander Neumann 2017-08-05 19:24:56 +02:00
parent 4477d76f03
commit 41c35b2218
7 changed files with 148 additions and 20 deletions

View file

@ -260,7 +260,7 @@ func Calibrate(timeout time.Duration, memMiBytes int, params Params) (Params, er
var again bool
memBytes := memMiBytes << 20
// If we'd use more memory then the allowed, we can tune the memory usage
for 128*p.R*p.N > memBytes {
for 128*int64(p.R)*int64(p.N) > int64(memBytes) {
if p.R > 1 {
// by lowering r
p.R--