Create an account for chain=dev (#5612)

* implement From<&'static str> for Secret

* Dev account.

* Fix Secret semantics.
This commit is contained in:
Tomasz Drwięga
2017-05-19 17:06:36 +02:00
committed by Gav Wood
parent e7abd3510a
commit 3ff72794e5
27 changed files with 83 additions and 45 deletions

View File

@@ -192,7 +192,7 @@ pub mod ecdh {
let sec = key::SecretKey::from_slice(context, &secret)?;
let shared = ecdh::SharedSecret::new_raw(context, &publ, &sec);
Secret::from_slice(&shared[0..32])
Secret::from_unsafe_slice(&shared[0..32])
.map_err(|_| Error::Secp(SecpError::InvalidSecretKey))
}
}