summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/d5/tengo/v2/stdlib/hex.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/d5/tengo/v2/stdlib/hex.go')
-rw-r--r--vendor/github.com/d5/tengo/v2/stdlib/hex.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/vendor/github.com/d5/tengo/v2/stdlib/hex.go b/vendor/github.com/d5/tengo/v2/stdlib/hex.go
new file mode 100644
index 00000000..981da696
--- /dev/null
+++ b/vendor/github.com/d5/tengo/v2/stdlib/hex.go
@@ -0,0 +1,12 @@
+package stdlib
+
+import (
+ "encoding/hex"
+
+ "github.com/d5/tengo/v2"
+)
+
+var hexModule = map[string]tengo.Object{
+ "encode": &tengo.UserFunction{Value: FuncAYRS(hex.EncodeToString)},
+ "decode": &tengo.UserFunction{Value: FuncASRYE(hex.DecodeString)},
+}