ShopPlatform.Web
1.0.0.0
농산물, 소프트웨어 라이선스와 개발 용역을 직접 판매하는 CodeMaru 직영 쇼핑몰입니다.
Toggle main menu visibility
로딩중...
검색중...
일치하는것 없음
PaymentKeyProtector.cs
이 파일의 문서화 페이지로 가기
1
using
Microsoft.AspNetCore.DataProtection;
2
3
namespace
ShopPlatform.Services
;
4
13
public
sealed
class
PaymentKeyProtector
14
{
23
private
readonly IDataProtector
_protector
;
24
41
public
PaymentKeyProtector
(IDataProtectionProvider provider)
42
=>
_protector
= provider.CreateProtector(
"ShopPlatform.PaymentKeys"
);
43
68
public
string
Protect
(
string
plainText) =>
_protector
.Protect(plainText);
69
94
public
string
?
Unprotect
(
string
? cipherText)
95
{
96
if
(
string
.IsNullOrEmpty(cipherText))
return
null
;
97
try
{
return
_protector
.Unprotect(cipherText); }
98
catch
{
return
null
; }
99
}
100
}
ShopPlatform.Services
Definition
CartService.cs:3
ShopPlatform.Services.PaymentKeyProtector.Unprotect
string? Unprotect(string? cipherText)
Definition
PaymentKeyProtector.cs:94
ShopPlatform.Services.PaymentKeyProtector.Protect
string Protect(string plainText)
Definition
PaymentKeyProtector.cs:68
ShopPlatform.Services.PaymentKeyProtector._protector
readonly IDataProtector _protector
Definition
PaymentKeyProtector.cs:23
ShopPlatform.Services.PaymentKeyProtector.PaymentKeyProtector
PaymentKeyProtector(IDataProtectionProvider provider)
Definition
PaymentKeyProtector.cs:41
Services
PaymentKeyProtector.cs
다음에 의해 생성됨 :
1.17.0