Skip to content

Commit

Permalink
refreshing
Browse files Browse the repository at this point in the history
  • Loading branch information
josd committed Dec 28, 2024
1 parent c876995 commit e4de6d0
Show file tree
Hide file tree
Showing 6 changed files with 60,024 additions and 60,018 deletions.
15 changes: 11 additions & 4 deletions logic-programming/crypto.pl
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
% Crypo tests

'<urn:example:sha>'(A, B, C) :-
atom_concat(sha, A, D),
sha_hash(B, E, [algorithm(D)]),
hash_atom(E, C).


% queries
true :+ '<http://www.w3.org/2000/10/swap/crypto#md5>'(literal('blargh', _), _).
true :+ '<http://www.w3.org/2000/10/swap/crypto#sha>'(literal('blargh', _), _).
true :+ '<http://www.w3.org/2000/10/swap/crypto#sha256>'(literal('blargh', _), _).
true :+ '<http://www.w3.org/2000/10/swap/crypto#sha512>'(literal('blargh', _), _).
true :+ '<urn:example:sha>'(1, 'blargh', _).
true :+ '<urn:example:sha>'(224, 'blargh', _).
true :+ '<urn:example:sha>'(256, 'blargh', _).
true :+ '<urn:example:sha>'(384, 'blargh', _).
true :+ '<urn:example:sha>'(512, 'blargh', _).
Loading

0 comments on commit e4de6d0

Please sign in to comment.