Fork me on GitHub
#babashka
<
2023-10-30
>
Eugen23:10:48

hi @borkdude, congrats for the 1500th 🙂 . I would like to implement ansible-vault-clj and need this PR for that https://github.com/babashka/babashka/pull/1638 (at least on the decrypt side, will check encryption after that). Com on ... I was just writing this message when I saw you merged the PR . And was cleaning the code to push as example. Please have the "decency" to let me support my PR before you merge it 🙂 . (Thank you very much, you are awesome)

😂 5
🔥 2
borkdude23:10:20

Hehe, just don't make a PR if you're not ready ;)

Eugen23:10:45

good point !

borkdude23:10:46

but seriously, I just looked at the code and it made sense to mergre ;)

Eugen23:10:04

this is the work in progress code for vault decryption

Eugen23:10:27

I need to fix PKCS5Padding . Python does it, Java does not let me do it

Eugen23:10:41

so I need to fix it on my own

borkdude23:10:32

you can install the dev version using:

bash <(curl ) --dev-build --dir /tmp
once CI finishes, but when working through a problem like this, it's probably best to run babashka using a JVM and add the classes

borkdude23:10:40

until you're done

Eugen23:10:38

decryption works - the padding in Clojure and the only complaint I got with bb was that class

Eugen23:10:47

and it's right at the end 🙂

Eugen23:10:01

so I hope it's enough

Eugen23:10:16

but will keep in mind the above when I tackle encryption 🙂

👍 1
borkdude23:10:40

note: when cloning bb you need to clone recursively for the git submodules

👍 1
borkdude23:10:17

and I usually add a dev alias to my ~/.clojure/deps.edn so I can run it with:

clj -M:babashka/dev my_test_script.clj

❤️ 1
til 1
Eugen23:10:03

I'll keep this in mind for tomorrow. Thanks, going to bed now

Eugen23:10:15

hint hint

borkdude23:10:05

thanks for the hint ;)

borkdude23:10:10

bye bye 💤

borkdude08:11:34

@U011NGC5FFY I new bb release is imminent, were you able to add the classes you needed locally?

Eugen08:11:53

hi, I did not have time to check that yet

Eugen08:11:09

will try in 30 min to see if decripton works and get back

borkdude08:11:25

ok, I'll wait

Eugen08:11:32

tested, decryption works for my code sample

borkdude08:11:38

without any added classes?

Eugen08:11:59

I used the snapshot build

Eugen08:11:28

started a repl

pushd /home/ieugen/proiecte/clojure/compoje ; /tmp/bb --nrepl-server 34105 ; popd  
connected from calva and evaled my code

Eugen08:11:30

it worked

Eugen08:11:48

snapshot sould have the IvParameterSpec.

borkdude08:11:32

thanks for testing