Fix: now sha1 result_str() return correct value
auto merge of #5140 : yjh0502/rust/issue_4458, r=catamorphism

Fix is a bug fix for issue #4458.

This patch is quite straight-forward. A test for result_str() is added.