aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-09-28 12:46:36 +0200
committerMario Vavti <mario@mariovavti.com>2018-09-28 12:46:36 +0200
commitc6db644c4208397a863f06f45f91918d44a994f3 (patch)
treed087516e4b9efdd35a32b8d2a12aa48b70e93fe6
parentd7a20821c3b5920715384e1256315fdddd4ba96b (diff)
parent5cc19ce053338dbc0b1ffdc4b43122479e641837 (diff)
downloadvolse-hubzilla-c6db644c4208397a863f06f45f91918d44a994f3.tar.gz
volse-hubzilla-c6db644c4208397a863f06f45f91918d44a994f3.tar.bz2
volse-hubzilla-c6db644c4208397a863f06f45f91918d44a994f3.zip
Merge remote-tracking branch 'mike/master' into dev
-rw-r--r--library/jsonld/jsonld.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/library/jsonld/jsonld.php b/library/jsonld/jsonld.php
index 28b3e7ce3..8cd3e7ceb 100644
--- a/library/jsonld/jsonld.php
+++ b/library/jsonld/jsonld.php
@@ -4301,7 +4301,7 @@ class JsonLdProcessor {
sort($nquads);
// cache and return hashed quads
- $hash = $bnodes->{$id}->hash = sha1(implode($nquads));
+ $hash = $bnodes->{$id}->hash = hash('sha256',implode($nquads));
return $hash;
}
@@ -4320,8 +4320,8 @@ class JsonLdProcessor {
* @return stdClass the hash and path namer used.
*/
protected function _hashPaths($id, $bnodes, $namer, $path_namer) {
- // create SHA-1 digest
- $md = hash_init('sha1');
+ // create digest
+ $md = hash_init('sha256');
// group adjacent bnodes by hash, keep properties and references separate
$groups = new stdClass();
@@ -4350,7 +4350,7 @@ class JsonLdProcessor {
}
// hash direction, property, and bnode name/hash
- $group_md = hash_init('sha1');
+ $group_md = hash_init('sha256');
hash_update($group_md, $direction);
hash_update($group_md, $quad->predicate->value);
hash_update($group_md, $name);
@@ -4433,7 +4433,7 @@ class JsonLdProcessor {
$path_namer = $chosen_namer;
}
- // return SHA-1 hash and path namer
+ // return hash and path namer
return (object)array(
'hash' => hash_final($md), 'pathNamer' => $path_namer);
}