You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ntool/ncrypt/base64.go

15 lines
338 B
Go

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)
}