Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Hex<->Bas64
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { var bytes1 = FromHex("0009002E00000000001D840311AA6611CD9BC800AA002FC45A0D0052B0074B7B78AB4DAB97BFBD663941E30003298BFB470000"); Console.WriteLine(Convert.ToBase64String( bytes1)); //Your code goes here var bytes = Convert.FromBase64String("AAMkADQ2N2VmMDQ1LTY2MjItNGExMC1iZWMxLTQ1NWUwYWIzNTdmNwBGAAAAAAC0C7CUlo1cTbV+rumK7wlaBwBcw67lpRcaTYd82bltlyWRAAAAAAEJAABcw67lpRcaTYd82bltlyWRAAAAAHSvAAABEgAQAAvld9qQ0LFMkhfT3EAOToc="); Console.WriteLine(ToHex(bytes)); } public static string ToHex(byte[] bytes) { string res = ""; for(int i=0; i<bytes.Length; i++) { res+= Convert.ToString(bytes[i], 16); } return res; } public static byte[] FromHex(string hexString) { int length = hexString.Length; byte[] bytes = new byte[length / 2]; for (int i = 0; i < length; i += 2) { bytes[i / 2] = Convert.ToByte(hexString.Substring(i, 2), 16); } return bytes; } } }
run
|
edit
|
history
|
help
0
Problem_fb_series
FizzBuzz C#
asdfrgyjukiuytre sdcd
Hi
adxasxd
asfdfsafasfsa
Aufgabe 1 J.S.
MightConst - Runtime Constwrapper Value (C#)
Plt-D v.0.9.3
SCZDXA S