Closed revoltez closed 5 months ago
I think what you would want is a function that does the 2nd part of CreateDecryptCryptoConfig()
that processes the various key types after reading files.
Did you not just reuse the public function encconfig.DecryptWithPrivKeys(privKeys, privKeysPasswords)
to add private keys for decryption and then call encconfig.CombineCryptoConfigs(ccs)
in the end?
Oh i didn't those functions, my bad, i highly appreciate it, thanks!
I was at some point needing to use
nerdctl
as a library in which they useimgcrypt
and i needed a way to pass the keys created in memory directly instead of reading them from the filesystem, so i had to copy your functionsprocessRecipientKeys
which takes a string of recipients, and in the case of decryption itsprocessPrivateKeyFiles
and added an extra argument which are the keys and removed the parts of reading from the FS, so i was wondering if it would be possible to create public functions that also support passing a array of byte arrays (the keys) instead? it would make the library more accessible.