Comments (9)
v1.1 contains it, including tests.
from sodium.jl.
A very basic (and probably errorprone) first iteration could be like that:
@eval Sodium function seal(msg, pk)
sodium_init() < 1 && error("something didn't work")
len = sizeof(msg)
ciphertext = Vector{Cuchar}(undef, crypto_box_SEALBYTES + len)
crypto_box_seal(ciphertext, msg, len, pk)
return String(ciphertext)
end
That's how I monkeypatched it for now 😁
EDIT: Replaced length(msg)
by sizeof(msg)
as msg can be a unicode string in which case we need to cover the fact that a single char can take multiple bytes.
from sodium.jl.
Since you wrapped the direct bindings in Sodium.LibSodium, adding convenience in Sodium seems like an actually good layout. 😄
Yeah, that's the plan, but I don't have the bandwidth of maintaining the helper APIs. 😂 I'm actually looking for someone to help with maintaining this package.
from sodium.jl.
I've read your message on the slack. But I only know how to maintain the wrapper generator part of the package, I actually never use this package. @bramtayl may chime in with the Github secrets stuff.
from sodium.jl.
I'm kinda in the same boat as @Gnimuc. My implementation in OnlinePackage is similar to yours;
raw_encoded = Vector{Cuchar}(undef, crypto_box_sealbytes() + length(private_key))
error_code = crypto_box_seal(
raw_encoded,
private_key,
length(private_key),
sodium_key
)
if error_code != 0
error("Error using libsodium.crypto_box_seal")
end
from sodium.jl.
@bramtayl so I guess your private key is ascii only? 😄
Do you also need it to enable testing of private packages?
from sodium.jl.
I'm not 100% sure what I'm talking about, so just take this with a grain of salt. The encryption algorithms used in Github secrets and the default one used in libsoduim's crypto_box_seal
may mismatch.
https://libsodium.gitbook.io/doc/public-key_cryptography/sealed_boxes#algorithm-details
from sodium.jl.
I got to that code via guess and check, so no idea tbh
from sodium.jl.
I think those will be working together flawlessly:
https://developer.github.com/v3/actions/secrets/#create-or-update-a-secret-for-a-repository
from sodium.jl.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sodium.jl.