SetWorkFactor sets the scrypt work factor to 2^logN. It must be called before Wrap. If SetWorkFactor is not called, a reasonable default is used.
(logN int)
| 53 | // |
| 54 | // If SetWorkFactor is not called, a reasonable default is used. |
| 55 | func (r *ScryptRecipient) SetWorkFactor(logN int) { |
| 56 | if logN > 30 || logN < 1 { |
| 57 | panic("age: SetWorkFactor called with illegal value") |
| 58 | } |
| 59 | r.workFactor = logN |
| 60 | } |
| 61 | |
| 62 | const scryptSaltSize = 16 |
| 63 |
no outgoing calls