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
去看了下不同地方的iv算法,发现各有不同,目前采取写法是: iv := encrypted[:aes.BlockSize] 希望这个能开放自定义
iv := encrypted[:aes.BlockSize]
The text was updated successfully, but these errors were encountered:
需要保持和以前版本兼容,如果开放自定义iv,需要将iv设计成可变参数。可以做如下修改:
func AesCbcEncrypt(data, key []byte, ivs... []byte) { iv := encrypted[:aes.BlockSize] if len(ivs) > 0 { iv = ivs[0] } // ..... }
Sorry, something went wrong.
No branches or pull requests
去看了下不同地方的iv算法,发现各有不同,目前采取写法是:
iv := encrypted[:aes.BlockSize]
希望这个能开放自定义
The text was updated successfully, but these errors were encountered: