Upgrades hash libraries to v0.9

pull/41/head
Tpt 4 years ago
parent 3f3406e1a0
commit 8c02fd7513
  1. 9
      lib/Cargo.toml
  2. 2
      lib/src/sparql/eval.rs

@ -5,6 +5,7 @@ authors = ["Tpt <thomas@pellissier-tanon.fr>"]
license = "MIT/Apache-2.0" license = "MIT/Apache-2.0"
readme = "../README.md" readme = "../README.md"
keywords = ["RDF", "N-Triples", "Turtle", "RDF/XML", "SPARQL"] keywords = ["RDF", "N-Triples", "Turtle", "RDF/XML", "SPARQL"]
categories = ["database-implementations"]
repository = "https://github.com/oxigraph/oxigraph" repository = "https://github.com/oxigraph/oxigraph"
description = """ description = """
An RDF and SPARQL library in Rust An RDF and SPARQL library in Rust
@ -20,10 +21,10 @@ rocksdb = { version = "0.14", optional = true }
sled = { version = "0.32", optional = true } sled = { version = "0.32", optional = true }
quick-xml = "0.18" quick-xml = "0.18"
rand = "0.7" rand = "0.7"
md-5 = "0.8" md-5 = "0.9"
sha-1 = "0.8" sha-1 = "0.9"
sha2 = "0.8" sha2 = "0.9"
digest = "0.8" digest = "0.9"
regex = "1" regex = "1"
oxilangtag = "0.1" oxilangtag = "0.1"
oxiri = "0.1" oxiri = "0.1"

@ -1818,7 +1818,7 @@ impl<'a, S: ReadableEncodedStore + 'a> SimpleEvaluator<S> {
tuple: &EncodedTuple, tuple: &EncodedTuple,
) -> Option<EncodedTerm> { ) -> Option<EncodedTerm> {
let input = self.to_simple_string(self.eval_expression(arg, tuple)?)?; let input = self.to_simple_string(self.eval_expression(arg, tuple)?)?;
let hash = hex::encode(H::new().chain(input.as_str()).result()); let hash = hex::encode(H::new().chain(input.as_str()).finalize());
self.build_string_literal(&hash) self.build_string_literal(&hash)
} }
} }

Loading…
Cancel
Save