소스 검색

:edit 解密时直接输出保温

fly 3 달 전
부모
커밋
8a549291d7
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      algorithm/encryption/AesCBCWithPadding.go

+ 1 - 1
algorithm/encryption/AesCBCWithPadding.go

@@ -72,5 +72,5 @@ func (a *AesCBCWithPadding) Decrypt(ciphertext []byte) ([]byte, error) {
 	mode.CryptBlocks(decrypted, ciphertext)
 
 	plaintext := zeroUnPad(decrypted)
-	return plaintext, nil
+	return plaintext[aes.BlockSize:], nil
 }