neosmart / SecureStore

A .NET implementation of the cross-platform SecureStore (symmetrically-encrypted secrets) protocol
MIT License
96 stars 15 forks source link

Create a LoadKeyFromStream to allow loading a key from a stream #7

Closed Ben3152 closed 2 years ago

Ben3152 commented 2 years ago

Hello,

I'm enjoying using this product so far! One thing I would like to see is the ability to load the key from a stream, as you can do for the store file. This would be very useful for one of our projects at work.

Thank you

mqudsi commented 2 years ago

Hi @BenjaminAdvocatia,

Thanks for filing this issue! We can certainly consider doing that, but to help make this decision can you explain how your keys are deployed and how they end up as a stream and not a file?

Thanks!

Ben3152 commented 2 years ago

One of our projects is a WPF program to help manage the secrets in the store file, in a standalone program, for internal use. We currently use the Ookii.Dialogs.Wpf package to select and pull the store and key files from the filesystem, and one of the methods Ookii Dialogs allows you to do is to grab the file itself as a stream. It'd be handy to be able to just use the stream information of the key file instead of copying the location of the file itself.

Thank you

mqudsi commented 2 years ago

@BenjaminAdvocatia I've added the API in question (both in sync and async flavors) and it's available via git on the master branch. I'm working on a few other issues I want to bundle together before I release an update on nuget - I'll ping this when that happens, DV.

Ben3152 commented 2 years ago

Sounds good, thanks!