Digester

Trait Digester 

Source
pub trait Digester {
    // Required method
    fn hash(&self, algorithm: HashAlgorithm) -> String;
}
Expand description

哈希计算器 trait

Hash Calculator Trait

Required Methods§

Source

fn hash(&self, algorithm: HashAlgorithm) -> String

计算哈希值

Calculate hash value

§Arguments
  • algorithm - 使用的哈希算法
§Returns
  • String - 十六进制格式的哈希值

Implementations on Foreign Types§

Source§

impl Digester for &[u8]

Source§

fn hash(&self, algorithm: HashAlgorithm) -> String

Source§

impl Digester for String

Source§

fn hash(&self, algorithm: HashAlgorithm) -> String

Source§

impl Digester for Vec<u8>

Source§

fn hash(&self, algorithm: HashAlgorithm) -> String

Source§

impl Digester for File

Source§

fn hash(&self, algorithm: HashAlgorithm) -> String

Implementors§