[C#] Base64/Base64Url Encode, Decode
Java에 비해 C#은 암호와 복호화가 용이했던 기억이.... 그런데 오랜만에 하려니 다 까먹어서 기록해 둔다 ㅠㅠ 1. 형변환 : byte[] to string, string to byte[] - 출처 : zephie.tistory.com/11 - byte[] to string : string str = Encoding.Default.GetString(byte[]); - string to byte[] : byte[] arrByte = Encoding.UTF8.GetBytes(string); 2. Base64Encode - string str = Convert.ToBase64String(byte[]); 3. Base64Decode - byte[] arrByte = Convert.FromBase64Stri..
C#
2020. 11. 2. 16:45