We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
hello,您好: cipher := NewCipher(t.crypotMethod, t.secret)
这句在每次连接时都会有新的cipher,但每次都生成有必要吗? 全程都应该是同样的加密方法,用一个cipher是不是就可以了,这样也减少开销。
谢谢。
The text was updated successfully, but these errors were encountered:
当时这么做可能是担心出现cipher会随着加密进程出现变化吧,你可以改下测试试试全局唯一的cipher是否可以正常加解密
Sorry, something went wrong.
hello: 我试了下,如果用全局的cipher来做,只有在请求并发很低的情况下才能正常加解密work。 但在高并发下是不行的。
我估计是用了io.copy这样的函数,在协程间共用了buffer。(我猜的,可能也不对)
但我还是觉得cipher应该全局唯一才好,因为他只做了加解密而已,并不用正对每一对上下游生成。 全程的加解密算法都是一样的。
不是很明白这里了。请教~
No branches or pull requests
hello,您好:
cipher := NewCipher(t.crypotMethod, t.secret)
这句在每次连接时都会有新的cipher,但每次都生成有必要吗?
全程都应该是同样的加密方法,用一个cipher是不是就可以了,这样也减少开销。
谢谢。
The text was updated successfully, but these errors were encountered: