Skip to content

Commit

Permalink
aead: use new_from_slice naming convention (#512)
Browse files Browse the repository at this point in the history
Following the convention introduced in #442, renames the
`NewAead::new_varkey` method to `::new_from_slice`.
  • Loading branch information
tarcieri committed Jan 31, 2021
1 parent 252b77f commit 2db9e3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aead/src/lib.rs
Expand Up @@ -82,10 +82,10 @@ pub trait NewAead {
/// Create a new AEAD instance with the given key.
fn new(key: &Key<Self>) -> Self;

/// Create new AEAD instance from key with variable size.
/// Create new AEAD instance from key given as a byte slice..
///
/// Default implementation will accept only keys with length equal to `KeySize`.
fn new_varkey(key: &[u8]) -> Result<Self, Error>
fn new_from_slice(key: &[u8]) -> Result<Self, Error>
where
Self: Sized,
{
Expand Down

0 comments on commit 2db9e3f

Please sign in to comment.