hexadecimal

Encrypt a hex string in java.

I would like to ask for any suggestions about my problem. I need to encrypt a hexadecimal string. I must not to use the built-in functions of java because it doesn't work in my server. In short, I have to hard code an algorithm or any means of encrypting the message. Anyone who could help me with this? thanks a lot! here is the code. p...

hexadecimal to decimal using NASM

I am trying to write a function to convert hexadecimal values to decimal values using Nasm. The basic method would be to take the hex number and multiply by 16 to the power of the place you are in (tens {0}, hundreds {1}, etc). I cannot think of how to write this in the assembler. ...

Converting float or negative integer to hexadecimal in Borland Delphi

Ive written a program that communicate with some hardware using a serial connection. It sends a lot of hexadecimal values my way (sensor readings) and every once in a while it sends a negative value. ex. i receive a hexadecimal value : FFFFF5D6 and i have to convert it into : -2602 another problem i have is that i can't convert a float ...

How to convert a floating point to hexadecimal (and back) in Delphi

Possible Duplicate: Converting float or negative integer to hexadecimal in Borland Delphi Is there a function i can use to convert a floating point value to a hexadecimal value and back? ...

Hex Representation of Floats in Haskell

I want to convert a Haskell Float to a String that contains the 32-bit hexadecimal representation of the float in standard IEEE format. I can't seem to find a package that will do this for me. Does anybody know of one? I've noticed that GHC.Float offers a function to decompose a Float into its signed base and exponent (decodeFloat), but...

How to set up C++ Number Formatting to a certain precision?

Hi, I understand that you can use iomanip to set a precision flags for floats (e.g. have 2.0000 as opposed to 2.00). Is there a way possible to do this, for integers? I would like a hex number to display as 000e8a00 rather than just e8a00 or 00000000 rather than 0. Is this possible in C++, using the standard libraries? ...

Actionscript 3.0 Translating HEX to ARGB

i'm studying getPixel32() and the Bitmap and Bitmap Data classes. Basically, i'd like to know how to output a simple trace of an ARGB from a hexadecimal value. as an aside, i'm under the impression, which i assume/hope is wrong, that hexadecimal values can't produce as many colors as RGBA values. perhaps "web safe" has thrown me off...

Using C++ hex and cin

If you have the following code: cout << hex << 10; The output is 'a', which means the decimal 10 is converted into its hexadecimal value. However, in the code below... int n; cin >> hex >> n; cout << n << endl; When input is 12, the output becomes 18. Can anyone explain the details of the conversion? How did it became a decimal va...

What english words can be created using hexadecimal?

I'm setting up an old wireless router for a friend which uses WEP (Yeah, very old, not actually very secure, but enough to keep the non-technical people in her apartment complex from sucking bandwidth) and I need to have a 10 digit hexadecimal key as the password. So the question is, what english words can be made using the hexadecimal ...

C#: How to bit shift hexadecimal digits

Okay, I am working on a card playing program, and I am storing card values as hexadecimal digits. Here is the array: public int[] originalCards = new int[54] { 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0...

Is there any char to hexadecimal function for C ?

I have a char array with data from a text file and I need to convert it to hexadecimal format. Is there such a function for C language. Thank you in advance! ...

Compute hex color code for an arbitrary string

Heading Is there a way to map an arbitrary string to a HEX COLOR code. I tried to compute the HEX number for string using string hashcode. Now I need to convert this hex number to six digits which are in HEX color code range. Any suggestions ? String [] programs = {"XYZ", "TEST1", "TEST2", "TEST3", "SDFSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS...

Converting uint color to argb hexadecimal for kml color

Good day everyone, I am stuck trying to convert a uint color value into its equivalent argb hexadecimal format. Basically, I am trying to convert a color from Flex(AS3) into its appropriate kml color, which is in the argb hexadecimal format from what I gather. Below is my function as it stands now. Although it does convert into a val...

NSString (hex) to bytes

Isn't there any method in Objective-c that converts a hex string to bytes? For example @"1156FFCD3430AA22" to an unsigned char array {0x11, 0x56, 0xFF, ...}. ...

Opposite Method to BitConverter.ToString?

The BitConverter.ToString gives a hexadecimal in the format 'XX-XX-XX-XX' Is there an opposite method to this so that I can obtain the original byte array from a string as given in this format? ...

PHP How to create real hex values from a string

Hi, I have a string with hexvalues that I use with sha1() echo sha1("\x23\x9A\xB9\xCB\x28\x2D\xAF\x66\x23\x1D\xC5\xA4\xDF\x6B\xFB\xAE\x00\x00\x00\x01"); ab94fcedf2664edfb9b291f85d7f77f27f2f4a9d now I have another string with the same value only not hex. $string2=strtoupper("239ab9cb282daf66231dc5a4df6bfbae00000001"); I want to co...

Hex to Decimal conversion in C

Hi All, Here is my code which is doing the conversion from hex to decimal. The hex values are stored in a unsigned char array: int liIndex ; long hexToDec ; unsigned char length[4]; for (liIndex = 0; liIndex < 4 ; liIndex++) { length[liIndex]= (unsigned char) *content; printf("\n Hex value is %.2x", length[liIn...

Hexidecimal translation

I downloaded a flash player that has changeable settings. I am trying to change the color of the playlist. Problem is...it's using hex's I have never seen before. The existing hex is 0xdadada (for example, the style of hex) and when I tried to change it to #E1E1E1,which is normally a lighter grey, it came out all black. Does anyone kno...

Problem with writing a hexadecimal string

Here is my code /* gcc -c -Wall -g main.c gcc -g -lm -o main main.o */ #include <stdlib.h> #include <stdio.h> #include <string.h> void stringToHex(const char* string, char* hex) { int i = 0; for(i = 0; i < strlen(string)/2; i++) { printf("s%x", string[2*i]); //for debugging sprintf(&hex[i], "%x", string[2*i]); printf("h%x\n",...

Alert formatted as hexadecimal in JavaScript

How do I alert as FF and not 255 with this: var myHex1 = 0xff; alert(myHex1);//alerts 255 var myVar = 255; var myHex2 = myVar.toString(16); alert(myHex2);//also alerts 255 and not FF ...