private string GetSecretKey() { if (_certificate == null) { _certificate = _certificateService.GetCertificate(CertificateName); } return(_certificate?.GetPublicKeyString()); }
private string DecryptString(string encryptedString, IAppConfiguration appConfiguration) { var cert = _certificateService.GetCertificate(appConfiguration.EncryptionCertificateSettings); var encryptedPasswordAsBytes = Convert.FromBase64String( encryptedString.TrimStart(EncryptionPrefix.ToCharArray())); var decryptedPasswordAsBytes = cert.GetRSAPrivateKey() .Decrypt(encryptedPasswordAsBytes, RSAEncryptionPadding.OaepSHA1); return(System.Text.Encoding.UTF8.GetString(decryptedPasswordAsBytes)); }
public string GetCertificate(TargetApplication application) { return(_certificateService.GetCertificate(application)); }
/// <summary> /// 获取节点信息 /// </summary> /// <returns></returns> public IList <CertificateEntity> GetCertificate() { return(bll.GetCertificate()); }
public CertificateDTO Get(string txId) { return(certService.GetCertificate(txId)); }