[consfigurator] binary (non utf8) secrets
Sean Whitton
spwhitton at spwhitton.name
Mon Apr 14 02:01:22 BST 2025
Hello,
On Sun 13 Apr 2025 at 08:06am -03, David Bremner wrote:
>> Though ... STRING-DATA suggests that valid UTF-8 is required. FILE-DATA
>> isn't appropriate for DATA.PGP, so perhaps we need a new OCTETS-DATA.
>
> Hmm. Not sure if you refer to just the naming issue, but
> consfigurator::%get-data-string does return the expected
> (SIMPLE-ARRAY (UNSIGNED-BYTE 8) (512))
Thanks. The %GET-DATA-STREAM generic, specialised on STRING-DATA,
unconditionally tries to encode a string into bytes. But that's not
appropriate in your case. That's why I'm thinking we need a new
BINARY-DATA/OCTETS-DATA which would have %GET-DATA-STRING and
%GET-DATA-STREAM implementations that didn't try to transform the array.
Or possibly we could make that generic only try to encode if it is
actually given a string, but why not make use the type system, eh?
--
Sean Whitton
More information about the sgo-software-discuss
mailing list