diff --git a/Cargo.toml b/Cargo.toml index fd0c727..1016621 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sha256" -version = "1.1.0" +version = "1.1.1" authors = ["baoyachi "] edition = "2018" description = "sha256 crypto digest" diff --git a/src/lib.rs b/src/lib.rs index 2788f67..64ed07d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -111,6 +111,12 @@ impl Sha256Digest for &[u8; N] { } } +impl Sha256Digest for &[u8] { + fn digest(self) -> String { + __digest__(self) + } +} + impl Sha256Digest for String { fn digest(self) -> String { __digest__(self.as_bytes())