Click here to Skip to main content
15,879,535 members
Please Sign up or sign in to vote.
1.67/5 (3 votes)
See more:
i want to convert this "fb5a681a-44a1-458c-8b97-2d0f3262360c" to in 64 correcter as this "5B6C3D5B524C241761FC3CBD46A315DA0EE227DF93AB1156722C96F437D8852C"
in witch encode is this i don't know but my need is this.
i search for this and find this but ....
Posted
Updated 13-Nov-15 21:16pm
v2
Comments
So where is the issue? What have you tried?
Member 11368739 14-Nov-15 0:58am    
ACTUALY I DON'T UNDERSTAND THIS CODE I USE SIMPLE C# CODE AND WANT THIS CODE IN SIMPLE C# FORMAT.
If you don't understand the code, then why you want to convert?
Member 11368739 14-Nov-15 1:37am    
actually i want to convert this "fb5a681a-44a1-458c-8b97-2d0f3262360c" to in 64 correcter as this "5B6C3D5B524C241761FC3CBD46A315DA0EE227DF93AB1156722C96F437D8852C"
in witch encode is this i don't know but my need is this.
i search for this and find this but ....
Krunal Rohit 14-Nov-15 0:49am    
Did you try anything ? Syntax look pretty good to me and almost similar with the C#.

-KR

So do it.
Learn Java, learn C# and start work.
It's probably not complex - the syntax of both languages is very similar.

Alternatively, find code that does "the right job" in a language you do understand.

But we aren't here to do your work for you!
 
Share this answer
 
A quick test of taking your input string and encoding it in Base64 using [^], then converting it to Hexadecimal format suggests that what the ActionScript 'encode64 function is doing appears to be not a standard Base64 conversion.

Until you understand what the code in ActionScript is doing ... which could be influenced by:

1. OS in use and its character encoding

2. ActionScript character encoding

3. whatever Character Encoding set is "in play"

and you will need to understand how operators/api methods in ActionScript that appear similar to C# actually work.

So, start doing some basic research into ActionScript; ask questions on ActionScript forums. And, of course, use Google and search for similar questions, for code identical to the ActionScript 'encode64 function.

You just might be lucky and have someone here turn up who has dealt with the same problem but, most likely, you will have to puzzle it out yourself.

Here's an example in C# that takes a string, converts it to Base64 and then converts that to a string in Hex format:
C#
// required
using System.Linq;

var plainTextBytes = System.Text.Encoding.UTF8.GetBytes(plainText);
string strBase64 = System.Convert.ToBase64String(plainTextBytes);
string strBase64ToHex = string.Join("", str.Select(c => ((int)c).ToString("X2")));
as base 64:

QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLz0=

as Hexadecimal representation of base 64:

51554A44524556475230684A536B744D545535505546465355315256566C645957567068596D4E6B5A575A6E61476C7161327874626D397763584A7A6448563264336835656A41784D6A4D304E5459334F446B724C7A303D
 
Share this answer
 
Comments
Member 11368739 14-Nov-15 4:53am    
sir i m try this but this Solution generate more than 64 corrector i want only 64 corrector maximam66 corrector not more.

var plainTextBytes = System.Text.Encoding.UTF8.GetBytes(str14);
string strBase64 = System.Convert.ToBase64String(plainTextBytes);
string strBase64ToHex = string.Join("", strBase64.Select(c => ((int)c).ToString("X2").ToUpper()));
BillWoodruff 14-Nov-15 6:05am    
What happened to the ActionScript code ? Or, was that JavaScript >

Until we know the transformation being used to here, there's no point in trying further experiments.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900