Click here to Skip to main content
14,773,486 members
Home » Discussions » C#
   

C#

 
GeneralRe: VS2017/2019 VSIX broken - I need a favor Pin
honey the codewitch8-Jun-19 6:43
mvahoney the codewitch8-Jun-19 6:43 
QuestionC# mp4 stream reader Pin
nicko134-Jun-19 10:13
Membernicko134-Jun-19 10:13 
AnswerRe: C# mp4 stream reader Pin
OriginalGriff4-Jun-19 20:06
mveOriginalGriff4-Jun-19 20:06 
GeneralRe: C# mp4 stream reader Pin
nicko135-Jun-19 8:46
Membernicko135-Jun-19 8:46 
AnswerRe: C# mp4 stream reader Pin
Gerry Schmitz5-Jun-19 6:52
mveGerry Schmitz5-Jun-19 6:52 
GeneralRe: C# mp4 stream reader Pin
nicko135-Jun-19 8:59
Membernicko135-Jun-19 8:59 
QuestionDataProtection API Pin
Super Lloyd2-Jun-19 22:22
MemberSuper Lloyd2-Jun-19 22:22 
AnswerRe: DataProtection API Pin
Kornfeld Eliyahu Peter2-Jun-19 23:35
professionalKornfeld Eliyahu Peter2-Jun-19 23:35 
Quote:
To unprotect a previously-protected piece of data, pass the protected data to the Unprotect method. (There are byte[]-based and string-based overloads for developer convenience.) If the protected payload was generated by an earlier call to Protect on this same IDataProtector, the Unprotect method will return the original unprotected payload. If the protected payload has been tampered with or was produced by a different IDataProtector, the Unprotect method will throw CryptographicException.

The concept of same vs. different IDataProtector ties back to the concept of purpose. If two IDataProtector instances were generated from the same root IDataProtectionProvider but via different purpose strings in the call to IDataProtectionProvider.CreateProtector, then they are considered different protectors, and one will not be able to unprotect payloads generated by the other.

These two paragraphs tell me that you 'unprotect' a 'payload' you need the same DataProtector used to 'protect' it...
So the question is how do you re-create the DataProtector? I think (and I just reading it) that the 'purpose string' is for that...
You can send the same string array (certificate id?) as purpose string and get back a DataProtector of the same behavior over-and-over-again...
However it is not clear if you can re-create the IDataProtectionProvider (father of all)... You should test it and write a useful sample (as those of Microsoft are useless)...
"The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012

AnswerRe: DataProtection API Pin
Eddy Vluggen2-Jun-19 23:50
professionalEddy Vluggen2-Jun-19 23:50 
GeneralMy thoughts on C# Pin
Brian_TheLion1-Jun-19 16:43
MemberBrian_TheLion1-Jun-19 16:43 
GeneralRe: My thoughts on C# Pin
Dave Kreskowiak1-Jun-19 17:06
mveDave Kreskowiak1-Jun-19 17:06 
GeneralRe: My thoughts on C# Pin
Brian_TheLion1-Jun-19 19:16
MemberBrian_TheLion1-Jun-19 19:16 
GeneralRe: My thoughts on C# Pin
Luc Pattyn2-Jun-19 4:38
sitebuilderLuc Pattyn2-Jun-19 4:38 
GeneralRe: My thoughts on C# Pin
Brian_TheLion2-Jun-19 16:07
MemberBrian_TheLion2-Jun-19 16:07 
GeneralRe: My thoughts on C# Pin
Luc Pattyn2-Jun-19 16:41
sitebuilderLuc Pattyn2-Jun-19 16:41 
GeneralRe: My thoughts on C# Pin
Brian_TheLion2-Jun-19 17:09
MemberBrian_TheLion2-Jun-19 17:09 
GeneralRe: My thoughts on C# Pin
Dave Kreskowiak2-Jun-19 6:27
mveDave Kreskowiak2-Jun-19 6:27 
GeneralRe: My thoughts on C# Pin
Brian_TheLion2-Jun-19 15:25
MemberBrian_TheLion2-Jun-19 15:25 
GeneralRe: My thoughts on C# Pin
Dave Kreskowiak2-Jun-19 16:42
mveDave Kreskowiak2-Jun-19 16:42 
GeneralRe: My thoughts on C# Pin
Brian_TheLion2-Jun-19 17:30
MemberBrian_TheLion2-Jun-19 17:30 
GeneralRe: My thoughts on C# Pin
Dave Kreskowiak2-Jun-19 18:26
mveDave Kreskowiak2-Jun-19 18:26 
GeneralRe: My thoughts on C# Pin
Brian_TheLion2-Jun-19 18:46
MemberBrian_TheLion2-Jun-19 18:46 
GeneralRe: My thoughts on C# Pin
Dave Kreskowiak3-Jun-19 3:37
mveDave Kreskowiak3-Jun-19 3:37 
GeneralRe: My thoughts on C# Pin
#realJSOP2-Jun-19 5:29
mva#realJSOP2-Jun-19 5:29 
GeneralRe: My thoughts on C# Pin
Dave Kreskowiak2-Jun-19 6:44
mveDave Kreskowiak2-Jun-19 6:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.