/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package puntocassa;

import java.util.Base64;

/**
 *
 * @author Marco
 */
public class Encoding {

    public static String encodeString(String var) {
        String varEncode;

        varEncode = new String(Base64.getEncoder().encode(new StringBuffer(new String(Base64.getEncoder().encode(var.getBytes()))).reverse().toString().getBytes()));

        return varEncode;
    }

    public static String decodeString(String var) {
        String varDecode;

        varDecode = new String(Base64.getDecoder().decode(new StringBuffer(new String(Base64.getDecoder().decode(var.getBytes()))).reverse().toString().getBytes()));

        return varDecode;
    }

    public static void main(String[] args) {

       }
}
