Use secure hashes

Rust pattern

The hashing functions md2, md4, md5, and sha1 are detected as cryptographically insecure due to known vulnerabilities. It is advisable to use more secure hashing algorithms for cryptographic purposes.

references:

With Md2

BEFORE
let mut hasher = Md2::new();
AFTER
let mut hasher = Sha256::new();

With Md4

BEFORE
let mut hasher = Md4::new();
AFTER
let mut hasher = Sha256::new();

With Md5

BEFORE
let mut hasher = Md5::new();
AFTER
let mut hasher = Sha256::new();

With sha1

BEFORE
let mut hasher = Sha1::new();
AFTER
let mut hasher = Sha256::new();

With sha256

RUST
let mut hasher = Sha256::new();