java base64加密解密

加密:

            Base64.Encoder encoder = Base64.getEncoder();
            String base64 = encoder.encodeToString(bytes);

  

解密:

            Base64.Decoder decoder = Base64.getDecoder();
            byte[] bytes = decoder.decode(fileBase);

  

posted @ 2020-06-02 09:41  丿风轻灬云淡  阅读(96)  评论(0编辑  收藏  举报