package ncrypt import "git.noahlan.cn/noahlan/ntool/nbyte" // Base64Encode encode data with base64 encoding. func Base64Encode(s []byte) []byte { return nbyte.B64Encoder.Encode(s) } // Base64EncodeStr encode string data with base64 encoding. func Base64EncodeStr(s string) string { bs := Base64Encode([]byte(s)) return string(bs) }