我想将此函数转换为C# [英] I want to convert this function to C#

查看:63
本文介绍了我想将此函数转换为C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望将此fb5a681a-44a1-458c-8b97-2d0f3262360c转换为64位更正为5B6C3D5B524C241761FC3CBD46A315DA0EE227DF93AB1156722C96F437D8852C
女巫编码中的
这是我不知道但我需要的是这个。

i搜索这个并找到这个....但

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 ....

推荐答案

这样做。

学习Java,学习C#并开始工作。

它可能并不复杂 - 两种语言的语法非常相似。



或者,找到用你理解的语言做正确工作的代码。



但我们不是来为你做你的工作!
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!


使用[ ^ <快速测试输入字符串并在Base64中对其进行编码/ a>],然后将其转换为十六进制格式表明ActionScript的encode64函数正在执行的操作似乎不是标准的Base64转换。



直到 了解ActionScript中的代码正在做什么......这可能会受到影响通过:



1.正在使用的操作系统及其字符编码



2. ActionScript字符编码



3.无论字符编码集是正在播放



你需要了解运营商/ ActionScript中出现类似于C#的api方法实际上有效。



所以,开始对ActionScript进行一些基础研究;在ActionScript论坛上提问。当然,使用Google并搜索类似的问题,代码与ActionScript的encode64函数相同。



你可能很幸运,并且有人在这里出现谁处理了同样的问题,但最有可能的是,你必须自己解决这个问题。



这是C#的一个例子,它接受一个字符串,将其转换为Base64然后将其转换为十六进制格式的字符串:
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:
// 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")));

作为基数64:



QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLz0 =



作为基数的十六进制表示64:



51554A44524556475230684A536B744D545535505546465355315256566C645957567068596D4E6B5A575A6E61476C7161327874626D397763584A7A6448563264336835656A41784D6A4D304E5459334F446B724C7A303D

as base 64:

QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLz0=

as Hexadecimal representation of base 64:

51554A44524556475230684A536B744D545535505546465355315256566C645957567068596D4E6B5A575A6E61476C7161327874626D397763584A7A6448563264336835656A41784D6A4D304E5459334F446B724C7A303D


这篇关于我想将此函数转换为C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆