ascii85

Base64 encoding vs Ascii85 encoding

爱⌒轻易说出口 提交于 2019-12-09 09:32:32
问题 My project at work is using the Jackson JSON serializer to convert a bunch of Java objects into Strings in order to send them to REST services. Some of these objects contain sensitive data, so I've written custom serializers to serialize these objects to JSON strings, then gzip them, then encrypt them using AES ; This turns the strings into byte arrays, so I use the Base64 encoder in Apache commons codec to convert the byte arrays into strings. The custom deserializers behind the REST

A shorter UUID, ASCII85 with PHP

前提是你 提交于 2019-12-07 19:03:23
问题 I read about the UUID v4 and it's virtually unique, and that's what I need. The problem is, it's a too large number, is it possible to generate UUID's like Facebook or Twitter with fewer characters? I read some post, where you can shrink this code to 20 with Ascii85, but don't see a reliable PHP script doing the job. Someone knows a tested class?? for random ID's it the best way to store this 20 char, right? --- Edit --- @David Schwartz Thanks. I need a random unique identifier in a single

A shorter UUID, ASCII85 with PHP

瘦欲@ 提交于 2019-12-06 12:43:48
I read about the UUID v4 and it's virtually unique, and that's what I need. The problem is, it's a too large number, is it possible to generate UUID's like Facebook or Twitter with fewer characters? I read some post, where you can shrink this code to 20 with Ascii85, but don't see a reliable PHP script doing the job. Someone knows a tested class?? for random ID's it the best way to store this 20 char, right? --- Edit --- @David Schwartz Thanks. I need a random unique identifier in a single server, between 8 and 16 chars (ok 20 is fine if its the lowest). The idea it's to identify objets with

Encoding an array for url in PHP

≯℡__Kan透↙ 提交于 2019-12-04 05:08:19
问题 I have been working on some QR codes, I need to pass an array to the QR with the data but it needs encoding. The data itself is a json_array which is used to generate a PDF. If I use base64 encoding the QR code is stupidly large, and when using ascii85 it breaks the QR. Can you let me know of any encoding praticies which would work in the url, the shorted the coding the betetr. qr_generator.php?data={encoded_json_array} 回答1: You can try this: urlencode($string); It encodes a string to be

Encoding an array for url in PHP

浪尽此生 提交于 2019-12-02 03:48:25
I have been working on some QR codes, I need to pass an array to the QR with the data but it needs encoding. The data itself is a json_array which is used to generate a PDF. If I use base64 encoding the QR code is stupidly large, and when using ascii85 it breaks the QR. Can you let me know of any encoding praticies which would work in the url, the shorted the coding the betetr. qr_generator.php?data={encoded_json_array} You can try this: urlencode($string); It encodes a string to be appended as an url parameter. So if you have an array, try: urlencode(json_encode($array); 来源: https:/

Base85 aka ASCII85 java projects [closed]

走远了吗. 提交于 2019-11-28 05:04:57
问题 Does anyone know about any other than com.idataconnect.lib.ascii85codec java projects that do something like org.apache.commons.codec.binary.Base64 class? 回答1: I found this project that seems to do the trick: http://pdfbox.apache.org/downloads.html#recent Following class encodes and decodes. Code reviews and suggestions are very welcome: import org.apache.pdfbox.io.ASCII85InputStream; import org.apache.pdfbox.io.ASCII85OutputStream; import java.io.ByteArrayInputStream; import java.io