Fairly noob Clojure user, here.
I have a task to read two blocks of data from a file.
The blocks were created as follows:
Block 1: Plain UTF-8 text is blowfish-encrypted and then base64 encoded
Block 2: UTF-8 text is gzip-compressed, then blowfish-encrypted, and then
base64 encoded
Goal is to reverse those processes and get the text back.
Using azjure/decrypt with the following map on Block 1 yields the UTF-8
text just fine:
(decrypt txt
{:type :blowfish
:mode :ecb
:pad :zero
:did :base64
:doe :str
:key ky})
The trouble is with Block 2. With a goal of feeding the decrypted results
into a ztellman's byte-transform/decompress function, I used a similar map:
(decrypt txt
{:type :blowfish
:mode :ecb
:pad :zero
:did :base64
:key ky})
but the result was truncated at 128 bytes, rather than the ~3500 expected.
That looks like a bug, but may just be me not understanding proper usage.
I then took out the :did :base64 and used a byte-stream transform for the
base64 decoding. That leaves me trying to get some output encoding out of
decrypt that is acceptable to a byte-transform.
If it encodes to a string, byte-transform says it is not in :gzip format.
Left to default encoding, byte-transform complains about unable to convert
from Persistent Vector. I'm a bit at a loss, and tried various things to
make it a byte-array. Kind of suspicious that the decrypt didn't work,
though. The difference between Block 1 and Block 2 is the resulting text of
decryption is UTF-8 in one case, and more binary in the other. Is that
germain?
Clues or clue-bats welcome.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.