有人可以帮我把以下两行python转换成C#.
hash = hmac.new(secret, data, digestmod = hashlib.sha1)
key = hash.hexdigest()[:8]
Run Code Online (Sandbox Code Playgroud)
如果您有兴趣,其余的看起来像这样:
#!/usr/bin/env python
import hmac
import hashlib
secret = 'mySecret'
data = 'myData'
hash = hmac.new(secret, data, digestmod = hashlib.sha1)
key = hash.hexdigest()[:8]
print key
Run Code Online (Sandbox Code Playgroud)
谢谢