hex.go 251 B

123456789101112
  1. package stdlib
  2. import (
  3. "encoding/hex"
  4. "github.com/d5/tengo/v2"
  5. )
  6. var hexModule = map[string]tengo.Object{
  7. "encode": &tengo.UserFunction{Value: FuncAYRS(hex.EncodeToString)},
  8. "decode": &tengo.UserFunction{Value: FuncASRYE(hex.DecodeString)},
  9. }