将SHA1十六进制转换为基于16的整数

I need some help porting an algorithm from Ruby to Go.

In Ruby I have:

hex = Digest::SHA1.hexdigest(str).to_i(16)
hex.to_s(32)

Which creates a SHA1 hex string, converts it to an integer in base 16 and then back to a string in base 32.

How do I achieve the same in Go?

查看全部
douchuifk90315
douchuifk90315
2015/09/13 03:13
  • hex
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

2个回复