-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add package crypto, move files from tongsuogo to crypto #17
Conversation
这个动机是啥? |
Make tongsuogo be a drop-in replacement of golang standard crypto package. |
动机是要把SM4算法挪到crypto文件夹下,成为一个单独的package,就像之前的SHA256、SM3等模块,独立成包,而不是都放在tongsuogo里面。 但是发现牵一发而动全身,受影响的模块非常多,那就只能把协议无关的文件都移动到crypto下。tongsuogo依赖crypto,类似于libssl依赖libcrypto一样。 |
有冲突 |
Move protocol-independent files to crypto package. Remove gmsm/sm3, test sm3 with real test data.
Fixed |
|
||
// SetDHParameters sets the DH group (DH parameters) used to | ||
// negotiate an emphemeral DH key during handshaking. | ||
func (c *Ctx) SetDHParameters(dh *DH) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为什么删除这个?
@@ -26,48 +34,48 @@ type SM4Encrypter interface { | |||
} | |||
|
|||
type SM4Decrypter interface { | |||
DecryptionCipherCtx | |||
// crypto.DecryptionCipherCtx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果是不需要的变量定义,请删除
Move protocol-independent files to crypto package.
Remove gmsm/sm3, test sm3 with real test data.