You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
244 B
13 lines
244 B
package base64
|
|
|
|
import "encoding/base64"
|
|
|
|
///编码
|
|
func EncodeToString(src []byte) string {
|
|
return base64.StdEncoding.EncodeToString(src)
|
|
}
|
|
|
|
///解码
|
|
func DecodeString(s string) ([]byte, error) {
|
|
return base64.StdEncoding.DecodeString(s)
|
|
}
|
|
|