xgo/stdlib/hex.go
Ma_124 1ee7425c9d Stdlib encodings: hex, base64 (#216) (#221)
* stdlib/hex and stdlib/base64

* stdlib/hex and stdlib/base64: added docs
2019-08-09 13:36:45 -04:00

11 lines
261 B
Go

package stdlib
import (
"encoding/hex"
"github.com/d5/tengo/objects"
)
var hexModule = map[string]objects.Object{
"encode": &objects.UserFunction{Value: FuncAYRS(hex.EncodeToString)},
"decode": &objects.UserFunction{Value: FuncASRYE(hex.DecodeString)},
}