473,657 Members | 3,021 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

binascii in C++

I'm working on a project to create a keyfinder program that finds the
Windows CD Key in the registry and decodes it. I prototyped it in
Python and it worked great but for several reasons I've decided to
rewrite it in C++. I use the module binascii extensively in the Python
version but I can't find an equivalent module in C++. I'm not a
professional developer so maybe I'm overlooking something simple.

In particular I'm trying to find an equivalent to the binascii.b2a_he x()
and binascii.unhexl ify() functions.

Thanks,

Jeremy
Feb 1 '06 #1
1 2266

Jeremy wrote:
I'm working on a project to create a keyfinder program that finds the
Windows CD Key in the registry and decodes it. I prototyped it in
Python and it worked great but for several reasons I've decided to
rewrite it in C++. I use the module binascii extensively in the Python
version but I can't find an equivalent module in C++. I'm not a
professional developer so maybe I'm overlooking something simple.

In particular I'm trying to find an equivalent to the binascii.b2a_he x()
and binascii.unhexl ify() functions.
Perhaps you want the GMP library. In addition to it's unlimited
precision math, it also does base conversions (2-36).

<http://www.swox.com/gmp>

Thanks,

Jeremy


Feb 1 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3419
by: nobody | last post by:
1) Does anyone know if the CRC32 algorithm in binascii has a name? There seem to be a TON of different CRC32 methods; different polynomials, different byte orders, different seeds, some flip the bits and some XOR the result with something else. I've been looking around and a lot of documents (RFCs, etc) refer to ISO3309 and/or ITU-T V.42 (neither of which appear to be available without paid access), yet are often incompatible with each...
12
5916
by: Mercuro | last post by:
Hello i'm looking for a simple way to checksum my data. The data is 70 bytes long per record, so a 32 byte hex md5sum would increase the size of my mysql db a lot. I'm looking for something that is 5 bytes long, for the moment i'm just taking a part of the hex md5 sum (like this: checksum = md5sum). I
9
7285
by: py | last post by:
Hi, I am encoding a string such as... data = someFile.readlines() encoded = for line in data: encoded.append(binascii.b2a_uu(stringToEncode)) return encoded
12
9830
by: Larry Bates | last post by:
I'm trying to get the results of binascii.crc32 to match the results of another utility that produces 32 bit unsigned CRCs. binascii.crc32 returns results in the range of -2**31-1 and 2**21-1. Has anyone ever worked out any "bit twiddling" code to get a proper unsigned 32 bit result from binascii.crc32? Output snip from test on three files: binascii.crc32=-1412119273, oldcrc32= 2221277246
15
2343
by: Claudio Grondi | last post by:
Let's consider a test source code given at the very end of this posting. The question is if Python allows somehow access to the bytes of the representation of a long integer or integer in computers memory? Or does Python hide such implementation details that deep, that there is no way to get down to them? The test code below shows, that extracting bits from an integer value n is faster when using n&0x01 than when using n%2 and I...
2
3919
by: Jeremy | last post by:
I'm working on a project to create a keyfinder program that finds the Windows CD Key in the registry and decodes it. I prototyped it in Python and it worked great but for several reasons I've decided to rewrite it in C++. I use the module binascii extensively in the Python version but I can't find an equivalent module in C++. I'm not a professional developer so maybe I'm overlooking something simple. In particular I'm trying to find...
2
1858
by: Ed Swarthout | last post by:
Why is there no binascii.a2b_binary(bitstr) which returns the binary data represented by the bit string? Like: >>> binascii.a2b_binary('0011001100110101') '35' perl has pack("B*", "0011001100110101"); What is the python way to do this?
0
2303
by: yaipa | last post by:
I snipped this bit of code out of Andrew Kuchling 'pyCrypto' test fixture. Having a need to XOR Binascii Hex strings in my current project, I found it very helpful to cut down on a bit of code clutter. So if you have a need for a Crypto module, this one seems to work off the self without much effort and it comes /w a nice XOR function too boot. :-) PyCrypto can be found at: http://www.amk.ca/python/code/crypto
6
5211
by: Vishal | last post by:
Hi, I have a file with a long list of hex characters, and I want to get a file with corresponding binary characters here's what I did: .... x = line.rstrip('\n') .... y = binascii.unhexlify(x) .... df.write(y)
0
8384
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8302
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8718
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8601
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7314
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1601
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.