Skip to content
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

AesEcbDecrypt 以及slice的删除有问题: #159

Open
supermigo opened this issue Jan 6, 2024 · 2 comments
Open

AesEcbDecrypt 以及slice的删除有问题: #159

supermigo opened this issue Jan 6, 2024 · 2 comments

Comments

@supermigo
Copy link

1第一个问题:
AesEcbDecrypt :
AesEcbDecrypt([]byte("12312"), []byte("1234123412341234"))
里面用到了:bs:be 的问题:
cipher.Decrypt(decrypted[bs:be], encrypted[bs:be])
如果说bs 的be 超过了encrypted 的长度, 那么最喜欢的painc 来了!
第二个问题
slice.deleteat(slicedata,slicedata.indexof(slicedata,"123123"))
存在一种可能。 slice的底层数据没有删除干净。

@duke-git
Copy link
Owner

duke-git commented Jan 7, 2024

@supermigo,可以尝试提PR修复,近期工作比较忙,精力有限。

@mkuiwu
Copy link

mkuiwu commented Apr 2, 2024

if index >= len(slice) {
	index = len(slice) - 1
}  不如多判断一个index < 0?  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants