mauleTTT Posted April 7, 2003 Posted April 7, 2003 Hi all, anyone knows how to make this in VB .NET ? The function AscB is not yet supported by .NET. fnclngLeftShift(AscB(Mid(strMissatge, lngContByte + 1, 1)), lngPosByte) The problem is in the AscB function. I don't know, how to do this, or how to substitute the AscB function. Sorry for my english. Thanks. Quote
*Gurus* divil Posted April 7, 2003 *Gurus* Posted April 7, 2003 What is your program trying to do? There may be a much simpler .NET way of achieving your goal. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
mauleTTT Posted April 7, 2003 Author Posted April 7, 2003 I'm only want how to do this in .NET. I don't understand what are you asking me, sorry Quote
*Experts* Volte Posted April 7, 2003 *Experts* Posted April 7, 2003 What is the function of your program going to be? What do you need AscB() for? Quote
mauleTTT Posted April 7, 2003 Author Posted April 7, 2003 The AscB function is used in a procedure, that converts a string in a byte array of that string. The objective it's make an implementation of the MD4 message-digest algorithm. I'm only want to know if anyone knows how I can get the first byte of one char of a string. Thanks Quote
*Experts* Volte Posted April 7, 2003 *Experts* Posted April 7, 2003 You can convert a string to a byte array like this: Dim bArray() As Byte bArray = System.Text.ASCIIEncoding.ASCII.GetBytes(myString) Yay! 500th post! :) Quote
mauleTTT Posted April 7, 2003 Author Posted April 7, 2003 Thanks for the answer, but the AscB function, returns only the first byte of a character, I don't want the entire collection. I don't know if I'm explaining well, sorry for my english. Thanks Quote
*Gurus* divil Posted April 7, 2003 *Gurus* Posted April 7, 2003 The point is, you don't *have* to do all that work - you can convert a string to a byte array with what VolteFace showed you. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
*Experts* Volte Posted April 7, 2003 *Experts* Posted April 7, 2003 If you want only the first byte, do what I told you to, and then just use bArray(0) to get the first byte in the array. Quote
mauleTTT Posted April 7, 2003 Author Posted April 7, 2003 Ok, i will try it, this night i will comment the results :) Thanks for your answer. Quote
mauleTTT Posted April 7, 2003 Author Posted April 7, 2003 Well i have tested it, and it works. Thanks to all. :rolleyes: Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.