diff --git a/CHANGELOG.md b/CHANGELOG.md
index cf33b456..e94509c9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [5.6.58]
+- make aes ctr encryption mode can set iv
+
## [5.6.57]
- update AudioAuditing api
- add VideoAuditing new params
diff --git a/pom.xml b/pom.xml
index 8a456e9b..f657f3e5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
4.0.0
com.qcloud
cos_api
- 5.6.57
+ 5.6.58
jar
cos-java-sdk
java sdk for qcloud cos
diff --git a/src/main/java/com/qcloud/cos/internal/crypto/AesCtr.java b/src/main/java/com/qcloud/cos/internal/crypto/AesCtr.java
index 10d806a1..6a4bf7e3 100644
--- a/src/main/java/com/qcloud/cos/internal/crypto/AesCtr.java
+++ b/src/main/java/com/qcloud/cos/internal/crypto/AesCtr.java
@@ -20,14 +20,16 @@
class AesCtr extends ContentCryptoScheme {
+ private byte[] iv = null;
+
@Override String getKeyGeneratorAlgorithm() { return AES_GCM.getKeyGeneratorAlgorithm(); }
@Override String getCipherAlgorithm() { return "AES/CTR/NoPadding"; }
@Override int getKeyLengthInBits() { return AES_GCM.getKeyLengthInBits(); }
@Override int getBlockSizeInBytes() { return AES_GCM.getBlockSizeInBytes(); }
@Override int getIVLengthInBytes() { return 16; }
@Override long getMaxPlaintextSize() { return MAX_CTR_BYTES; }
- @Override byte[] getIV() { return null; }
- @Override void setIV(byte[] iv) {}
+ @Override byte[] getIV() { return this.iv; }
+ @Override void setIV(byte[] iv) { this.iv = iv; }
@Override
byte[] adjustIV(byte[] iv, long byteOffset) {