Bump sha2 from 0.8.2 to 0.9.2 (#7643)

* Bump sha2 from 0.8.2 to 0.9.2

Bumps [sha2](https://github.com/RustCrypto/hashes) from 0.8.2 to 0.9.2.
- [Release notes](https://github.com/RustCrypto/hashes/releases)
- [Commits](https://github.com/RustCrypto/hashes/compare/sha2-v0.8.2...streebog-v0.9.2)

Signed-off-by: dependabot[bot] <support@github.com>

* Fix compilation error

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
dependabot[bot]
2021-01-11 11:58:26 +00:00
committed by GitHub
parent 0c1a7447bf
commit 6b4cc36c60
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -8338,7 +8338,7 @@ dependencies = [
"secrecy",
"serde",
"serde_json",
"sha2 0.8.2",
"sha2 0.9.2",
"sp-debug-derive",
"sp-externalities",
"sp-runtime-interface",
+1 -1
View File
@@ -46,7 +46,7 @@ ed25519-dalek = { version = "1.0.1", default-features = false, features = ["u64_
blake2-rfc = { version = "0.2.18", default-features = false, optional = true }
tiny-keccak = { version = "2.0.1", features = ["keccak"], optional = true }
schnorrkel = { version = "0.9.1", features = ["preaudit_deprecated", "u64_backend"], default-features = false, optional = true }
sha2 = { version = "0.8.0", default-features = false, optional = true }
sha2 = { version = "0.9.2", default-features = false, optional = true }
hex = { version = "0.4", default-features = false, optional = true }
twox-hash = { version = "1.5.0", default-features = false, optional = true }
libsecp256k1 = { version = "0.3.2", default-features = false, features = ["hmac"], optional = true }
+4 -4
View File
@@ -77,7 +77,7 @@ pub fn blake2_64(data: &[u8]) -> [u8; 8] {
/// Do a XX 64-bit hash and place result in `dest`.
pub fn twox_64_into(data: &[u8], dest: &mut [u8; 8]) {
use ::core::hash::Hasher;
use core::hash::Hasher;
let mut h0 = twox_hash::XxHash::with_seed(0);
h0.write(data);
let r0 = h0.finish();
@@ -94,7 +94,7 @@ pub fn twox_64(data: &[u8]) -> [u8; 8] {
/// Do a XX 128-bit hash and place result in `dest`.
pub fn twox_128_into(data: &[u8], dest: &mut [u8; 16]) {
use ::core::hash::Hasher;
use core::hash::Hasher;
let mut h0 = twox_hash::XxHash::with_seed(0);
let mut h1 = twox_hash::XxHash::with_seed(1);
h0.write(data);
@@ -163,8 +163,8 @@ pub fn keccak_512(data: &[u8]) -> [u8; 64] {
/// Do a sha2 256-bit hash and return result.
pub fn sha2_256(data: &[u8]) -> [u8; 32] {
let mut hasher = Sha256::new();
hasher.input(data);
hasher.update(data);
let mut output = [0u8; 32];
output.copy_from_slice(&hasher.result());
output.copy_from_slice(&hasher.finalize());
output
}