File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
main/java/com/amazonaws/encryptionsdk/model
test/java/com/amazonaws/encryptionsdk/model Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ public Boolean isComplete() {
180180 */
181181 private int parseVersion (final byte [] b , final int off ) throws ParseException {
182182 version_ = PrimitivesParser .parseByte (b , off );
183- if (CiphertextType . deserialize ( version_ ). getValue () != VersionInfo .CURRENT_CIPHERTEXT_VERSION ) {
183+ if (version_ != VersionInfo .CURRENT_CIPHERTEXT_VERSION ) {
184184 throw new BadCiphertextException ("Invalid version type." );
185185 }
186186 return 1 ;
Original file line number Diff line number Diff line change @@ -323,9 +323,9 @@ public void invalidVersion(){
323323 final byte [] headerBytes = ciphertextHeaders .toByteArray ();
324324 final ByteBuffer headerBuff = ByteBuffer .wrap (headerBytes );
325325
326- readUptoType (headerBuff );
326+ readUptoVersion (headerBuff );
327327
328- //set version to invalid value of 0.
328+ //set version to invalid type of 0.
329329 headerBuff .put ((byte ) 0 );
330330
331331 final CiphertextHeaders reconstructedHeaders = new CiphertextHeaders ();
You can’t perform that action at this time.
0 commit comments