From 78a955007c4c2af79b8d5a832c99a988873c8e02 Mon Sep 17 00:00:00 2001 From: ghost Date: Fri, 1 Nov 2024 12:42:20 +0100 Subject: [PATCH] reverted change --- src/main/java/com/thealgorithms/ciphers/ProductCipher.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/thealgorithms/ciphers/ProductCipher.java b/src/main/java/com/thealgorithms/ciphers/ProductCipher.java index 3e89c9dea1d6..d7eaea757001 100644 --- a/src/main/java/com/thealgorithms/ciphers/ProductCipher.java +++ b/src/main/java/com/thealgorithms/ciphers/ProductCipher.java @@ -25,13 +25,13 @@ public static void main(String[] args) { System.out.println(substitutionOutput); // Transposition encryption - StringBuilder transpositionInput = new StringBuilder(substitutionOutput.toString()); + String transpositionInput = substitutionOutput.toString(); int modulus = transpositionInput.length() % n; if (modulus != 0) { modulus = n - modulus; for (; modulus != 0; modulus--) { - transpositionInput.append("/"); + transpositionInput += "/"; } } StringBuffer transpositionOutput = new StringBuffer();