Ejemplo n.º 1
0
 /// <summary>
 /// Set the authorization credentials for a Nntp Server.
 /// </summary>
 /// <param name="sd">NntpServerDefinition to be modified</param>
 /// <param name="user">username, identifier</param>
 /// <param name="pwd">password</param>
 public static void SetNntpServerCredentials(NntpServerDefinition sd, string user, string pwd)
 {
     if (sd == null)
     {
         return;
     }
     sd.AuthPassword = CryptHelper.EncryptB(pwd);
     sd.AuthUser     = user;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Get the authorization credentials for a feed.
 /// </summary>
 /// <param name="sd">NntpServerDefinition, where the credentials are taken from</param>
 /// <param name="user">String return parameter containing the username</param>
 /// <param name="pwd">String return parameter, containing the password</param>
 public static void GetNntpServerCredentials(NntpServerDefinition sd, out string user, out string pwd)
 {
     pwd = user = null;
     if (sd == null)
     {
         return;
     }
     pwd  = (sd.AuthPassword != null ? CryptHelper.Decrypt(sd.AuthPassword) : null);
     user = sd.AuthUser;
 }