From 9be1b562d34e6a7c0c8c30bcbb4956357a29ec64 Mon Sep 17 00:00:00 2001 From: ccamel Date: Tue, 7 Nov 2023 11:57:38 +0100 Subject: [PATCH] feat(logic): deprecate sha_hash/2 predicate --- x/logic/predicate/crypto.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/x/logic/predicate/crypto.go b/x/logic/predicate/crypto.go index 74f8f514..a9edbb0f 100644 --- a/x/logic/predicate/crypto.go +++ b/x/logic/predicate/crypto.go @@ -16,6 +16,9 @@ import ( // SHAHash is a predicate that computes the Hash of the given Data. // +// Deprecated: sha_hash/2 should not be used anymore as it will be removed in a future release. +// Use the new sha_hash/3 predicate instead. +// // The signature is as follows: // // sha_hash(+Data, -Hash) is det @@ -31,7 +34,7 @@ import ( // Examples: // // # Compute the hash of the given data and unify it with the given Hash. -// - sha_hash("Hello OKP4", Hash). +// - sha_hash('Hello OKP4', Hash). func SHAHash(vm *engine.VM, data, hash engine.Term, cont engine.Cont, env *engine.Env) *engine.Promise { return engine.Delay(func(ctx context.Context) *engine.Promise { var result []byte