Skip to content

Conversation

@stemann
Copy link
Contributor

@stemann stemann commented Oct 14, 2025

Looking into adding something like this to support encryption/decryption...

@stemann stemann force-pushed the feature/data_encoder branch from 6176502 to 6a7282d Compare October 14, 2025 14:48
@stemann stemann force-pushed the feature/data_encoder branch from 6a7282d to 4cb14ed Compare October 30, 2025 22:06
@stemann stemann marked this pull request as ready for review October 30, 2025 22:07
@stemann stemann changed the title WIP Added data_encoder, and data_decoder handlers Added data_encoder, and data_decoder handlers Oct 30, 2025
@MichaelHatherly
Copy link
Collaborator

I'd be interested in seeing how this would be used in practise. Just seeing the handlers isn't giving me a clear picture of how they're actually be used to provide encryption support. If you'd prefer to discuss somewhere other than in a public PR then that's fine with me.

@stemann
Copy link
Contributor Author

stemann commented Nov 5, 2025

The data_encoder and data_decoder handlers can just do something simple, e.g.

function data_encoder(data::Vector{UInt8})::Vector{UInt8}
    encryption_key = parse(UInt8, ENV["SECRET_KEY"])
    return xor.(data, encryption_key)
end

function data_decoder(data::Vector{UInt8})::Vector{UInt8}
    encryption_key = parse(UInt8, ENV["SECRET_KEY"])
    return xor.(data, encryption_key)
end

I.e., doing encryption/decryption using whatever is available in the (default) environment executing the code loading - or using a custom-built Julia with special encryption/decryption-support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants