MCPcopy Create free account
hub / github.com/bytesnake/vim-graphical-preview / hash

Function hash

src/utils.rs:12–19  ·  view source on GitHub ↗
(input: &str)

Source from the content-addressed store, hash-verified

10use crate::render::ART_PATH;
11
12pub fn hash(input: &str) -> String {
13 let mut hasher = Sha256::new();
14 hasher.update(input.as_bytes());
15 let result = hasher.finalize();
16 let mut x = format!("{:x}", &result);
17 x.truncate(24);
18 x
19}
20
21/// Get pixel height of a character
22pub fn char_pixel_height() -> usize {

Callers 5

parse_equationFunction · 0.85
parse_latexFunction · 0.85
pathMethod · 0.85
processMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected