public Grupo Decrypt(CoeusProjectContext Context = null) { if (this.Salt == null) { if (Context == null) { Context = new CoeusProjectContext(); } this.Salt = Context.Salt.Where(s => s.IdSalt == this.IdSalt).FirstOrDefault(); } this.NmGrupo = SecurityFacade.Decrypt(this.NmGrupo, this.Salt.BtSalt); return(this); }
public Objeto Decrypt(CoeusProjectContext Context = null) { if (this.Salt == null) { if (Context == null) { Context = new CoeusProjectContext(); } this.Salt = Context.Salt.Where(s => s.IdSalt == this.IdSalt).FirstOrDefault(); } this.NmObjeto = SecurityFacade.Decrypt(this.NmObjeto, this.Salt.BtSalt); this.TxDescricao = SecurityFacade.Decrypt(this.TxDescricao, this.Salt.BtSalt); return(this); }
public Usuario Decrypt(CoeusProjectContext Context = null) { if (this.Salt == null) { if (Context == null) { Context = new CoeusProjectContext(); } this.Salt = Context.Salt.Where(s => s.IdSalt == this.IdSalt).FirstOrDefault(); } this.TxEmail = SecurityFacade.Decrypt(TxEmail.Replace("*****@*****.**", ""), this.Salt.BtSalt); this.NmPessoa = SecurityFacade.Decrypt(NmPessoa, this.Salt.BtSalt); this.SnPessoa = SecurityFacade.Decrypt(SnPessoa, this.Salt.BtSalt); return(this); }
public Mensagem Decrypt(Int32 IdGrupo = 0, Usuario usuario = null, CoeusProjectContext Context = null) { if (IdGrupo > 0) { if (Context == null) { Context = new CoeusProjectContext(); } this.Grupo = Context.Grupos.Where(g => g.IdGrupo == IdGrupo).FirstOrDefault(); } if (this.Grupo == null) { if (Context == null) { Context = new CoeusProjectContext(); } this.Grupo = Context.Grupos.Where(g => g.IdGrupo == this.IdGrupo).Include(g => g.Salt).FirstOrDefault(); } if (this.Grupo.Salt == null) { if (Context == null) { Context = new CoeusProjectContext(); } this.Grupo.Salt = Context.Salt.Where(s => s.IdSalt == this.Grupo.IdSalt).FirstOrDefault(); } this.TxMensagem = SecurityFacade.Decrypt(this.TxMensagem, this.Grupo.Salt.BtSalt); if (usuario != null) { this.Usuario = usuario; } else if (this.Usuario != null) { this.Usuario.Decrypt(); } return(this); }
public Artigo Decrypt(CoeusProjectContext Context = null) { if (Context == null) { Context = new CoeusProjectContext(); } if (this.Objeto == null) { this.Objeto = Context.Objetos.Where(o => o.IdObjeto == this.IdObjeto).Include(o => o.Salt).FirstOrDefault(); } if (this.Objeto.Salt == null) { this.Objeto.Salt = Context.Salt.Where(s => s.IdSalt == this.Objeto.IdSalt).FirstOrDefault(); } this.Objeto.Decrypt(Context); this.TxArtigo = SecurityFacade.Decrypt(this.TxArtigo, this.Objeto.Salt.BtSalt); return(this); }