base32

Encoding a number, C# implementation of z-base-32 or something else?

I need to encode/decode an integer which is up to 9 digits long but most often 7 digits long. I'd like to make it easier to communicate/memorise - it will be communicated by phone, copied & pasted, keyed in from a card/memory/label, hand-written on labels and generally abused! I'm looking to reduce the number of digits (whilst adding a ...

Fast open source checksum for small strings

I need a quick checksum (as fast as possilbe) for small strings (20-500 chars). I need the source code and that must be small! (about 100 LOC max) If it could generate strings in Base32/64. (or something similar) it would be perfect. Basically the checksums cannot use any "bad" chars.. you know.. the usual (){}[].,;:/+-\| etc Clarifi...

Java z-base-32 encoding algorithm

I'm searching for an implementation of z-base-32 enc algo in java, any suggestions? (encoding and decoding) ...

Does php have a built in coversion to base32 values?

I know I can use number_format, but is there a way to represent base32 numbers? For example, hex can be represented with 0x... and octal can be represented with a 0 in the front. Is there anything to represent base32 numbers in php? ...

base32 conversion in C++

Hello, does anybody know any commonly used library for C++ that provides methods for encoding and decoding numbers from base 10 to base 32 and viceversa? Thanks, Stefano ...

Encrypt printable text so result is still printable (can be typed)

I want to encrypt some info for a licensing system and I want the result to be able to be typed in by the user. Update: This operation must be reversible (decrypt-able) E.g., Encrypt ( ComputerID+ProductID) -> (any standard ASCII character that can be typed. Ideally maybe even just A-Z). So far what I did was to convert the encrypted t...

Base32 decode in actionscript

Hi! How do I decode a Base32 encoded string in Actionscript? /Martin ...

Groovy to Biginteger

As the reverse of i.toString(32) is there a better (i.e. working) method to use instead of i = Integer.parseInt(string, 32) to create a BigInteger, as the string I want to pass is 11 'characters' long? (D4KJI9QLC3L) gives me java.lang.NumberFormatException: For input string: "D4KJI9QLC3L" Parameters:{val=14800099002200181, str=D4KJI9...

Convert a Perl function to PHP

Hello, I want to convert the perl function below to PHP function, if someone could help a little bit I'd appreaciate it: sub encode32 { $_=shift; my($l,$e); $_=unpack('B*',$_); s/(.....)/000$1/g; $l=length; if($l & 7) { $e=substr($_,$l & ~7); $_=substr($_,0,$l & ~7); $_.="000$e" . '0' ...

Groovy Base32 conversions

I am unable to use the fabulous tr() at the moment as I can only use Groovy 1.7.1 and wanted to know if there is an elegant way of going backwards and forwards between string and number encoded with Base32, but with the values A to Z then 2 to 7, rather than 0 to 9 then A to V. This is to remove customer error in typing in a human reada...

Why is a SHA-1 Hash 40 characters long if it is only 160 bit ?

The title of the question says it all. I have been researching SHA-1 and most places I see it being 40 Hex Characters long which to me is 640bit. Could it not be represented just as well with only 10 hex characters 160bit = 20byte. And one hex character can represent 2 byte right? Why is it twice as long as it needs to be? What am I miss...