From 27b6e934a100085543857caef83e6a459ffbd5fc Mon Sep 17 00:00:00 2001 From: "f.disciascio" Date: Tue, 9 Apr 2024 11:02:30 +0200 Subject: [PATCH] modifica algoritmo encoding renaming variabile --- src/puntocassa/Encoding.java | 8 +++++--- src/puntocassa/JInternalReport.java | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/puntocassa/Encoding.java b/src/puntocassa/Encoding.java index 559c324..b33fe7a 100644 --- a/src/puntocassa/Encoding.java +++ b/src/puntocassa/Encoding.java @@ -6,7 +6,9 @@ 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) { 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; } @@ -25,7 +27,7 @@ public class Encoding { public static String decodeString(String var) { 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; } diff --git a/src/puntocassa/JInternalReport.java b/src/puntocassa/JInternalReport.java index 67306c4..e12a45f 100644 --- a/src/puntocassa/JInternalReport.java +++ b/src/puntocassa/JInternalReport.java @@ -79,7 +79,7 @@ public class JInternalReport extends javax.swing.JInternalFrame { floatColumn.setPattern("#,##0.00"); columns.add(floatColumn); - if (Col[i].equalsIgnoreCase(MyA.ReportColonnaSomma)){ + if (Col[i].equalsIgnoreCase(MyA.reportColonnaSomma)){ itemColumn=floatColumn; } ColonnaPrezzi=floatColumn;