string authHeaderValue="hamid123456789"
byte[] byt = System.Text.Encoding.UTF8.GetBytes(authHeaderValue);
// thenconvert this byte array to a Base64 string
authHeaderValue = Convert.ToBase64String(byt);
now again get it in its original format
authHeaderValue = Encoding.Default.GetString(Convert.FromBase64String(authHeaderValue));
byte[] byt = System.Text.Encoding.UTF8.GetBytes(authHeaderValue);
// thenconvert this byte array to a Base64 string
authHeaderValue = Convert.ToBase64String(byt);
now again get it in its original format
authHeaderValue = Encoding.Default.GetString(Convert.FromBase64String(authHeaderValue));
No comments:
Post a Comment