BASE64 암호화/복호화
3515 단어 base64
1 import java.io.IOException;
2 import sun.misc.BASE64Decoder;
3 import sun.misc.BASE64Encoder;
4
5 public class Base64Util {
6 private static BASE64Encoder BASE64Encoder = new BASE64Encoder();
7
8 private static BASE64Decoder BASE64Decoder = new BASE64Decoder();
9
10 /* */
11 public static String encoder( byte[] bytes) {
12 return BASE64Encoder.encode(bytes);
13 }
14
15 /* */
16 public static String decoder(String str) throws IOException {
17 byte[] decodeBuffer = BASE64Decoder.decodeBuffer(str);
18 return new String(decodeBuffer);
19 }
20
21 public static byte[] decoderByByte(String str) throws IOException {
22 return BASE64Decoder.decodeBuffer(str);
23 }
24
25 }
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
ssh를 통해 이미지 데이터와 같은 바이너리를 서버로 보냅니다.ssh로부터 웹 컨텐츠 등을 편집하고 있을 때, 약간의 화상을 서버상에 보내고 싶을 때가 있다. 또 하나 콘솔을 열어 거기에서 scp하거나 전송용의 어플리케이션을 기동하거나 해도 괜찮지만, 괜찮다. 몇 대의 서버를 ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.