Skip to content

Commit

Permalink
feat(logic): deprecate sha_hash/2 predicate
Browse files Browse the repository at this point in the history
  • Loading branch information
ccamel committed Nov 7, 2023
1 parent a9af18c commit 9be1b56
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion x/logic/predicate/crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 9be1b56

Please sign in to comment.