2
0

util.go 406 B

1234567891011121314151617181920212223
  1. //go:build ee
  2. // +build ee
  3. package pro
  4. import (
  5. "encoding/base64"
  6. )
  7. // base64encode - base64 encode helper function
  8. func base64encode(input []byte) string {
  9. return base64.StdEncoding.EncodeToString(input)
  10. }
  11. // base64decode - base64 decode helper function
  12. func base64decode(input string) []byte {
  13. bytes, err := base64.StdEncoding.DecodeString(input)
  14. if err != nil {
  15. return nil
  16. }
  17. return bytes
  18. }