modifica algoritmo encoding

renaming variabile
This commit is contained in:
Francesco Di Sciascio 2024-04-09 11:02:30 +02:00
parent 88b560a8d5
commit 27b6e934a1
2 changed files with 6 additions and 4 deletions

View File

@ -6,7 +6,9 @@
package puntocassa; package puntocassa;
import org.bouncycastle.util.encoders.Base64; import java.util.Base64;
/** /**
* *
@ -17,7 +19,7 @@ public class Encoding {
public static String encodeString(String var) { public static String encodeString(String var) {
String varEncode; String varEncode;
varEncode = new String(Base64.encode(new StringBuffer(new String(Base64.encode(var.getBytes()))).reverse().toString().getBytes())); varEncode = new String(Base64.getEncoder().encode(new StringBuffer(new String(Base64.getEncoder().encode(var.getBytes()))).reverse().toString().getBytes()));
return varEncode; return varEncode;
} }
@ -25,7 +27,7 @@ public class Encoding {
public static String decodeString(String var) { public static String decodeString(String var) {
String varDecode; String varDecode;
varDecode = new String(Base64.decode(new StringBuffer(new String(Base64.decode(var.getBytes()))).reverse().toString().getBytes())); varDecode = new String(Base64.getDecoder().decode(new StringBuffer(new String(Base64.getDecoder().decode(var.getBytes()))).reverse().toString().getBytes()));
return varDecode; return varDecode;
} }

View File

@ -79,7 +79,7 @@ public class JInternalReport extends javax.swing.JInternalFrame {
floatColumn.setPattern("#,##0.00"); floatColumn.setPattern("#,##0.00");
columns.add(floatColumn); columns.add(floatColumn);
if (Col[i].equalsIgnoreCase(MyA.ReportColonnaSomma)){ if (Col[i].equalsIgnoreCase(MyA.reportColonnaSomma)){
itemColumn=floatColumn; itemColumn=floatColumn;
} }
ColonnaPrezzi=floatColumn; ColonnaPrezzi=floatColumn;