Skip to content

[Question] Why is Protect(string) and Unprotect(string) not part of IDataProtector? #2518

@aspnet-hello

Description

@aspnet-hello

From @Legogris on Friday, February 17, 2017 1:01:04 AM

When writing unit tests, it helps a lot being able to mock the results of these functions depending on the input.

Right now it is a big hassle doing this since we have to mock the byte-array versions and then mimic the internal implementations of the extension methods in DataProtectionCommonExtensions. I can't even get it to work properly for a particular use case. It would be very beneficial to have the directly on the interface.

Copied from original issue: aspnet/DataProtection#202

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions