Skip to content
This repository has been archived by the owner on Sep 4, 2022. It is now read-only.

Add convenience functions for pwhash() and derive_key() #309

Merged
merged 4 commits into from
Apr 10, 2019

Conversation

manuels
Copy link
Contributor

@manuels manuels commented Jan 22, 2019

The limit arguments in pwhash() and derive_key() with its two parameters is a bit "loud" with its two (for most users) constant parameters. This adds two convenience functions for both.

@manuels manuels force-pushed the patch-1 branch 2 times, most recently from 753fd19 to 2920427 Compare January 22, 2019 16:33
@coveralls
Copy link

coveralls commented Jan 22, 2019

Pull Request Test Coverage Report for Build 923

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 16 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.5%) to 94.472%

Files with Coverage Reduction New Missed Lines %
crypto/pwhash/scryptsalsa208sha256.rs 16 79.35%
Totals Coverage Status
Change from base Build 920: -0.5%
Covered Lines: 2905
Relevant Lines: 3075

💛 - Coveralls

/// `derive_key_interactive()` is a shortcut function for `derive_key()` with
/// interactive limits (i.e. using `derive_key()` with `OPSLIMIT_INTERACTIVE`
/// and `MEMLIMIT_INTERACTIVE`)
pub fn derive_key_interactive<'a>(
Copy link
Member

@kpp kpp Jan 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need that <'a>? Give rustc a try

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the compiler will fail if 'a is missing.

@manuels manuels force-pushed the patch-1 branch 3 times, most recently from 5c0af94 to 733f0f4 Compare January 26, 2019 12:07
The limit arguments in pwhash() and derive_key() with its two parameters is a bit "loud" with its two (for most users) constant parameters. This adds two convenience functions for both.
@Dylan-DPC-zz
Copy link
Member

bors: try

bors bot added a commit that referenced this pull request Apr 9, 2019
@bors
Copy link
Contributor

bors bot commented Apr 9, 2019

try

Build failed

@manuels
Copy link
Contributor Author

manuels commented Apr 10, 2019

bors: try

@bors
Copy link
Contributor

bors bot commented Apr 10, 2019

🔒 Permission denied

Existing reviewers: click here to make manuels a reviewer

@Dylan-DPC-zz
Copy link
Member

bors: r+

bors bot added a commit that referenced this pull request Apr 10, 2019
309: Add convenience functions for pwhash() and derive_key() r=Dylan-DPC a=manuels

The limit arguments in pwhash() and derive_key() with its two parameters is a bit "loud" with its two (for most users) constant parameters. This adds two convenience functions for both.

Co-authored-by: manuels <manuel.schoelling@gmx.de>
Co-authored-by: Dylan DPC <dylan.dpc@gmail.com>
Co-authored-by: Manuel Schölling <manuel.schoelling@gmx.de>
@bors
Copy link
Contributor

bors bot commented Apr 10, 2019

@bors bors bot merged commit 010dd09 into sodiumoxide:master Apr 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
5 participants