Mar. 24th, 2023

dybr

Mar. 24th, 2023 10:02 pm
juan_gandhi: (Default)
 This enthusiasm does not look like sane. Ok, I was cleaning up the next stage, to make sure that we don't store in the db the keys not properly encrypted. Which means, I have to decrypt one before storing, and to test, I have to encrypt something.

While doing this, I discovered that a) the encryptor wants BASE64 encoded data.

Now imagine. We take some bytes. Encoded them to BASE64. Then encrypt. Then encode the result as BASE64. The documentation a) insists on BASE64 url, and b) says nothing about the input having to be in BASE64. Well, whatever. Also found that my "BASE64 checker" had a bug. For some reason the data encoded don't always end with at least one `=` - why is it, really? Well, whatever. So far it works.

Also, prepared a pr for deployment to staging; it was approved, but I did not have time (or desire) to go ahead and deploy. Monday.

But I worked till after 22:00 CET. Maybe it's too much. Did not do much else.

But at least the code is getting neater. Except that, just for readability, I wrote this function:

def uncertainFuture[T](fun: => T): Future[T] = Future.fromTry(Try(fun))


It's a natural transformation, and with this we basically hardly need any "EitherT" or any other shit from Travis and other half-educated dummies.

Ok, IMHO.

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

December 2025

S M T W T F S
  12 3 4 56
7 8910111213
14151617181920
21222324252627
28293031   

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Dec. 11th, 2025 11:27 am
Powered by Dreamwidth Studios