Move doc comments from before drop trait to impl of Pbkdf2, since usage examples were shown under the drop trait impl
@@ -14,6 +14,14 @@ pub struct Pbkdf2 {
pub hmac: ShaVariantOption,
}
+impl Drop for Pbkdf2 {
+ fn drop(&mut self) {
+ //println!("DROPPING");
+ self.password.clear();
+ self.salt.clear()
+ }
+}
+
/// PBKDF2 (Password-Based Key Derivation Function 2) as specified in the
/// [RFC 8018](https://tools.ietf.org/html/rfc8018).
///
@@ -38,14 +46,6 @@ pub struct Pbkdf2 {
/// dk.pbkdf2_compute();
/// ```
-impl Drop for Pbkdf2 {
- fn drop(&mut self) {
- //println!("DROPPING");
- self.password.clear();
- self.salt.clear()
- }
-}
-
impl Pbkdf2 {
/// XOR two equal length bytes vectors.
