Browse Source

:edit 解密时直接输出保温

fly 3 months ago
parent
commit
8a549291d7
1 changed files with 1 additions and 1 deletions
  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)
 	mode.CryptBlocks(decrypted, ciphertext)
 
 
 	plaintext := zeroUnPad(decrypted)
 	plaintext := zeroUnPad(decrypted)
-	return plaintext, nil
+	return plaintext[aes.BlockSize:], nil
 }
 }