Skip to content

IEncryptionProvider ignored #577

Open
@AndAShape1

Description

@AndAShape1

I've been using a custom encryption provider for over a year but now it's ignored. I have analysed my code and I cannot see BlobCache.Secure being used before this call...

Locator.CurrentMutable.Register(() => providerInstance, typeof(IEncryptionProvider));

I've managed to get it working using this...

var cache = BlobCache.Secure;

cache.GetType().GetField("_encryption", BindingFlags.NonPublic | BindingFlags.Instance)
   .SetValue(cache, providerInstance);

How is this happening? Given that Akavache doesn't set it back to the default (I've removed my call to Register), there must be a call to its static constructor somewhere prior. Could it be in Akavache's code?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions