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

  • 關於本站
  • 免責聲明