/**
 * 对字符串进行md5编码，并且每2位转换为字符，然后进行base64
 * @param
 *  data:要编码的串
 **/
545032
func Md5Base64_16(data string) string {
	md5String := Md5Signature(data)
	md5CharString, _ := bytesbuffer.Hex_to_str(md5String)

	return base64.StdEncoding.EncodeToString([]byte(md5CharString))
}
825792
func Md5Base36(s string) string {
	h := md5.New()
	io.WriteString(h, s)
	s16 := fmt.Sprintf("%x", h.Sum(nil))
	bi := gmp.NewInt(0)
	bi.SetString(s16, 16)
	return fmt.Sprintf("%025s", bi.InBase(36))
}
804578
static String base64(byte[] data) {
        ByteBuf encodedData = Unpooled.wrappedBuffer(data);
        ByteBuf encoded = Base64.encode(encodedData);
        String encodedString = encoded.toString(CharsetUtil.UTF_8);
        encoded.release();
        return encodedString;
    }
1110114
func (p *pipe) data(idx uint64, size uint64) []byte {
	return p.buffer[(idx&offsetMask)+sizeOfSlotHeader:][:size]
}
1374874
func base64URLEncode(data []byte) string {
	var result = base64.URLEncoding.EncodeToString(data)
	return strings.TrimRight(result, "=")
}
1191450
func (i *Image) Data() []byte {
	var size C.size_t
	var data unsafe.Pointer = C.sp_image_data(i.sp_image, &size)
	return C.GoBytes(data, C.int(size))
}
1352603
func Md5Signature(data string) string {
	t := md5.New()
	io.WriteString(t, data)

	return fmt.Sprintf("%x", t.Sum(nil))
}
639984
func md5String(md5Sum [16]byte) string {
	md5Str := fmt.Sprintf("% x", md5Sum)
	md5Str = strings.Replace(md5Str, " ", ":", -1)
	return md5Str
}
899730
func Base64() (string, error) {
	jsonBytes, err := json.Marshal(Version)
	if err != nil {
		return "", err
	}
	return base64.StdEncoding.EncodeToString(jsonBytes), nil
}
355239
func base64Decode(b []byte) []byte {
	n, _ := base64.StdEncoding.Decode(b, b)
	return b[:n]
}
1209806
func LoadData(file string) ([]byte, error) {
	if len(file) == 0 {
		return []byte{}, nil
	}

	bytes, err := ioutil.ReadFile(file)
	if err != nil {
		return []byte{}, err
	}

	return bytes, nil
}
1227685
func (p Protected) Base64() ([]byte, error) {
	b, err := json.Marshal(map[string]interface{}(p))
	if err != nil {
		return nil, err
	}
	return Base64Encode(b), nil
}
105077
func ToBase64(data []byte) []byte {
	buf := make([]byte, base64.StdEncoding.EncodedLen(len(data)))
	base64.StdEncoding.Encode(buf, data)
	return buf
}
1133929
func (client *Client) EncryptData(inData []byte, pub *rsa.PublicKey) (data []byte, err error) {
	return rsa.EncryptOAEP(client.Hash, client.Reader, pub, inData, nil)
}
411978
public static String encodeBase64(final String data) {
        return Base64.encodeBase64String(data.getBytes(StandardCharsets.UTF_8));
    }
300421
func Data(data interface{}) Modifier {
	return func(r *http.Request) error {
		jsonb, err := json.Marshal(data)
		if err != nil {
			return err
		}

		b := bytes.NewBuffer(jsonb)
		rc := ioutil.NopCloser(b)
		r.Body = rc

		if b != nil {
			r.ContentLength = int64(b.Len())
		}
		return nil
	}
}
1009203
func (t *StringTree) Data() []string {
	arr := make([]string, t.Len())
	var i int
	i = 0
	t.Do(func(v string) bool {
		arr[i] = v
		i++
		return true
	})
	return arr
}