logo
  • 教程列表
  • SO官方文档
  • Base64 编码
    • 编码
    • 编码为字符串
    • 解码
    • 解码字符串
  1. StackOverflow 文档
  2. Go 教程
  3. Base64 编码
  4. 编码

编码

Created: November-22, 2018

const foobar = `foo bar`
encoding := base64.StdEncoding
encodedFooBar := make([]byte, encoding.EncodedLen(len(foobar)))
encoding.Encode(encodedFooBar, []byte(foobar))
fmt.Printf("%s", encodedFooBar)
// Output: Zm9vIGJhcg==

操场

  • 编码为字符串
  • Base64 编码

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 关于我们
  • 免责声明