Encoding arbitrary data into numbers?

Posted by Pekka on Stack Overflow See other posts from Stack Overflow or by Pekka
Published on 2010-06-05T21:08:04Z Indexed on 2010/06/05 21:12 UTC
Read the original article Hit count: 275

Filed under:
|
|

Is there a common method to encode and decode arbitrary data so the encoded end result consists of numbers only - like base64_encode but without the letters?

Fictitious example:

$encoded = numbers_encode("Mary had a little lamb");

echo $encoded; // outputs e.g. 122384337422394237423 (fictitious result)

$decoded = numbers_decode("122384337422394237423");

echo $decoded; // outputs "Mary had a little lamb"

© Stack Overflow or respective owner

Related posts about php

Related posts about algorithm