Page MenuHomePhabricator

eina: Adding API for base64 url encoding.
ClosedPublic

Authored by sri.hebbar on Dec 8 2015, 2:44 AM.

Details

Summary

I have put the common encoding code in the common function. The 2 API's
call them with a flag. Thinking of doing the same way to decode
function also.
T2880

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
sri.hebbar retitled this revision from to eina: Adding API for base64 url encoding..
sri.hebbar updated this object.
sri.hebbar edited the test plan for this revision. (Show Details)
sri.hebbar added reviewers: cedric, jpeg.
jpeg edited edge metadata.Dec 8 2015, 3:11 AM

I think an Eina_Bool would be simpler. Otherwise looks fine.
I'm looking forward to the base64url_decode patch.

Also, please call this "base64url" instead of "base64_url" since the standard calls it base64url:
https://tools.ietf.org/html/rfc4648

This encoding may be referred to as "base64url".  This encoding
should not be regarded as the same as the "base64" encoding and
should not be referred to as only "base64".  Unless clarified
otherwise, "base64" refers to the base 64 in the previous section.
src/lib/eina/eina_str.c
56

code style here:
Eina_Base64_Encode_Type for the enum typename
the values are all caps indeed

but why not just a bool? this is all internal, no need for this enum

jpeg accepted this revision.Dec 8 2015, 3:12 AM
jpeg edited edge metadata.

Two small changes :)

This revision is now accepted and ready to land.Dec 8 2015, 3:12 AM
jpeg requested changes to this revision.Dec 8 2015, 3:12 AM
jpeg edited edge metadata.

I meant to request changes. Sorry!

This revision now requires changes to proceed.Dec 8 2015, 3:12 AM
sri.hebbar marked an inline comment as done.Dec 8 2015, 3:18 AM
sri.hebbar added inline comments.
src/lib/eina/eina_str.c
56

Just thought, this is more readable...
Will remove this enum and make Eina_Bool

sri.hebbar edited edge metadata.
sri.hebbar marked an inline comment as done.
  • Updated according to comments.
jpeg accepted this revision.Dec 8 2015, 3:45 AM
jpeg edited edge metadata.

no padding? interesting. thanks, i will push this

This revision is now accepted and ready to land.Dec 8 2015, 3:45 AM
Closed by commit rEFL326d0e548d25: eina: Adding API for base64 url encoding. (authored by sri.hebbar, committed by Jean-Philippe Andre <jp.andre@samsung.com>). · Explain WhyDec 8 2015, 3:49 AM
This revision was automatically updated to reflect the committed changes.