[英]java RSA/ECB/OAEPWithSHA 256AndMGF1Padding equivalent in golang
I'm trying to migrate some java encryption code into golang and came across this我正在尝试将一些 java 加密代码迁移到 golang 并遇到了这个
Cipher cipher = Cipher.getInstance(RSA_ECB_OAEPWithSHA256AndMGF1Padding);
cipher.init(Cipher.WRAP_MODE, cert);
return cipher.wrap(key);
I'm trying to find any implementation of this in go.我试图在 go 中找到这个的任何实现。 Any help would be appreciated.
任何帮助,将不胜感激。 Thanks.
谢谢。
Though the question is a bit unclear I think you want a way to encode data in Go.虽然这个问题有点不清楚,但我认为您想要一种在 Go 中编码数据的方法。 You might find it helpful to google about the following standard Go packages:
crypto/hmac
crypto/sha256
encoding/base64
你可能会发现谷歌关于以下标准 Go 包很有帮助:
crypto/hmac
crypto/sha256
encoding/base64
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.