@@ -58,8 +58,6 @@ private static byte[] tdfECKeySaltCompute() {
5858
5959 private final SDK .Services services ;
6060
61- private static final Logger LOG = LoggerFactory .getLogger (TDF .class );
62-
6361 /**
6462 * Constructs a new TDF instance using the default maximum input size defined by
6563 * MAX_TDF_INPUT_SIZE.
@@ -299,7 +297,6 @@ public Manifest getManifest() {
299297
300298 public void readPayload (OutputStream outputStream ) throws SDK .SegmentSignatureMismatch , IOException {
301299
302- LOG .info ("Reading payload" );
303300 MessageDigest digest = null ;
304301 try {
305302 digest = MessageDigest .getInstance ("SHA-256" );
@@ -308,7 +305,6 @@ public void readPayload(OutputStream outputStream) throws SDK.SegmentSignatureMi
308305 }
309306
310307 for (Manifest .Segment segment : manifest .encryptionInformation .integrityInformation .segments ) {
311- LOG .info ("reading a segment" );
312308 if (segment .encryptedSegmentSize > Config .MAX_SEGMENT_SIZE ) {
313309 throw new IllegalStateException ("Segment size " + segment .encryptedSegmentSize + " exceeded limit "
314310 + Config .MAX_SEGMENT_SIZE );
@@ -325,7 +321,6 @@ public void readPayload(OutputStream outputStream) throws SDK.SegmentSignatureMi
325321
326322 var isLegacyTdf = manifest .tdfVersion == null || manifest .tdfVersion .isEmpty ();
327323
328-
329324 if (manifest .payload .isEncrypted ) {
330325 String segHashAlg = manifest .encryptionInformation .integrityInformation .segmentHashAlg ;
331326 Config .IntegrityAlgorithm sigAlg = Config .IntegrityAlgorithm .HS256 ;
@@ -353,9 +348,7 @@ public void readPayload(OutputStream outputStream) throws SDK.SegmentSignatureMi
353348
354349 outputStream .write (readBuf );
355350 }
356- LOG .info ("read a segment" );
357351 }
358- LOG .info ("finished reading payload" );
359352 }
360353
361354 public PolicyObject readPolicyObject () {
@@ -552,9 +545,7 @@ Reader loadTDF(SeekableByteChannel tdf, Config.TDFReaderConfig tdfReaderConfig,
552545 Reader loadTDF (SeekableByteChannel tdf , Config .TDFReaderConfig tdfReaderConfig ) throws SDKException , IOException {
553546
554547 TDFReader tdfReader = new TDFReader (tdf );
555- LOG .info ("loaded the tdf reader" );
556548 String manifestJson = tdfReader .manifest ();
557- LOG .info ("here is the manifest json {}" , manifestJson );
558549 // use Manifest.readManifest in order to validate the Manifest input
559550 Manifest manifest = Manifest .readManifest (manifestJson );
560551
@@ -651,7 +642,6 @@ Reader loadTDF(SeekableByteChannel tdf, Config.TDFReaderConfig tdfReaderConfig)
651642 }
652643 }
653644
654-
655645 String rootSigValue ;
656646 boolean isLegacyTdf = manifest .tdfVersion == null || manifest .tdfVersion .isEmpty ();
657647 if (manifest .payload .isEncrypted ) {
@@ -676,8 +666,6 @@ Reader loadTDF(SeekableByteChannel tdf, Config.TDFReaderConfig tdfReaderConfig)
676666 rootSigValue = Base64 .getEncoder ().encodeToString (digest .digest (aggregateHash .toString ().getBytes ()));
677667 }
678668
679- LOG .info ("validated the signature" );
680-
681669 if (rootSignature .compareTo (rootSigValue ) != 0 ) {
682670 throw new SDK .RootSignatureValidationException ("root signature validation failed" );
683671 }
@@ -740,8 +728,6 @@ Reader loadTDF(SeekableByteChannel tdf, Config.TDFReaderConfig tdfReaderConfig)
740728 }
741729 }
742730
743- LOG .info ("returning payload reader" );
744-
745731 return new Reader (tdfReader , manifest , payloadKey , unencryptedMetadata );
746732 }
747733}
0 commit comments