侧边栏壁纸
博主头像
帮主の后花园博主等级

欢迎光临,开开心心每一天

  • 累计撰写 21 篇文章
  • 累计创建 5 个标签
  • 累计收到 3 条评论

目 录CONTENT

文章目录

Base64 加密

Gxbalun
2022-04-27 / 0 评论 / 0 点赞 / 1037 阅读 / 13899 字

Base64 加密

  • 对文件进行 Base64 加密

    将图片 balun.png 转为 Base64 加密文件流

    balun
public void fileToBase64(){
        try {
            String path1 = "C:/Users/jinghao/Desktop/balun.png";
            String path2 = "C:/Users/jinghao/Desktop/balun.txt";
            File file1 = new File(path1);
            File file2 = new File(path2);
            file1.createNewFile();
            file2.createNewFile();
            FileInputStream inputStream = new FileInputStream(file1);
            FileOutputStream outputStream = new FileOutputStream(file2);
            byte[] buffer = new byte[(int) file1.length()];
            inputStream.read(buffer);
            inputStream.close();
            String encode = new BASE64Encoder().encode(buffer);
            outputStream.write(encode.getBytes(StandardCharsets.UTF_8));
            outputStream.close();
        }catch (Exception e){
            e.printStackTrace();
        }
    }

加密后:

image-20220427140909900

  • base64 转为文件

    public void Base64ToFile(){
            try {
                String base = "RPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSlBFRyB2NjIpLCBxdWFsaXR5ID0gODAK/9sAQwAGBAUGBQQGBgUGBwcGCAoQCgoJCQoUDg8MEBcUGBgXFBYWGh0lHxobIxwWFiAsICMmJykqKRkfLTAtKDAlKCko/9sAQwEHBwcKCAoTCgoTKBoWGigoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgo/8AAEQgAyADeAwEiAAIRAQMRAf/EAB0AAAEEAwEBAAAAAAAAAAAAAAABAwYHAgQFCAn/xABGEAABAwMDAgIHBAUJBwUAAAABAgMEAAURBhIhBzETQRQiUWFxgZEIFTJCI2KCoaIWJDNjcnOSscElNVOTssLRNENSg+H/xAAbAQADAQEBAQEAAAAAAAAAAAAAAQIDBAUGB//EACsRAQACAgIBAwIEBwAAAAAAAAABAgMRITEE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q7SNm87GWEDe8+vyQ2gcqUfd88Cqzt2io+pn7/d9bWlhT97fbeEJZ3GK22jY2N45C9vfBxyRXTSNue9oh4pZZdeQ84hta0NJ3OKSnISMgAn2DJA+dYclAyOB5/6V7mf6WaVOk7nYbfbW4LFwbCXHmsqcyk7kHcrJOFc4qudJfZuiRLn4+orsqdGRgpYjILQX/aVkkD4Y+Nae1EXiUL+zj02nX/UkHU0xKo9mtr4eacUMGQ6g5SE/qhQGT7sDnOPYya07fFjwIbMWEy2xGZSENtNp2pQkdgBW4mnrSd7Oop9FMIp9HalJweTTiabTTiaUrg4O1LWI7VlSMUnalrEkAEnAFAZUUmeOKDQC0UUUAUUUUBB6KKK2cgqJzLHdIus3dRWxcKYXoyIpizCpstISST4biQrG4kEgpOcDkYooqb1ia8nS01tw6hvtxaSTI03cFEecZ5hwfxOJP7qeb1VFHD0C8NLx+E255fyyhJH76KK5Zw1dkZrz2zOpZjgxb9P3Bz2OSVtsI+eVFY/wUw+7qm4EBc+FZ2D3TCb9Ie+TjgCR/wAs/GiitaY6sr5bMLXpq3QZ6rgpLsy5qGDNmOF57HsClfhH6qcD3V3k0UVqx3vs8mnkd6KKYg8ink0UVK4Oop5FFFJUHkU6miilKzie1LRRSMUg7UUUAtJ50UUAfCloooAooooD/9k=";
                byte[] buffer = new BASE64Decoder().decodeBuffer(base);
                String path = "C:/Users/jinghao/Desktop/test.png";
                new File(path).createNewFile();
                FileOutputStream outputStream = new FileOutputStream(path);
                outputStream.write(buffer);
                outputStream.close();
            }catch (Exception e){
                e.printStackTrace();
            }
        }
    

    动手试一下吧!

0

评论区