15,919,500 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 10500918 (Top 17 by date)
Member 10500918
14-Jan-14 1:10am
View
i have used this one..but i'm getting many errors..
i just want hide data in the image.. so where should i write the code...is it in the button HIDE
Member 10500918
13-Jan-14 3:31am
View
but my picture box tool in my toolbox window is diasbled
Member 10500918
13-Jan-14 3:03am
View
in web application
Member 10500918
10-Jan-14 5:12am
View
now the error is this
The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first. wp8sm16152106pbc.26 - gsmtp
Member 10500918
10-Jan-14 5:06am
View
still getting the same error
Member 10500918
10-Jan-14 4:39am
View
i still gor an error at smtp.Send(mail); that Failure sending mail.
can u pls give the namespaces that i should use
Member 10500918
10-Jan-14 3:46am
View
this is my code and i'm getting errors..can u pls help me
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Net;
using System.Net.Mail;
public partial class Default4 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
MailMessage mail = new ("dnscubes7@gmail.com", "niya4422@gmail.com");
SmtpClient client = new SmtpClient();
client.Port = 25;
client.DeliveryMethod = SmtpDeliveryMethod.Network;
client.UseDefaultCredentials = false;
client.Host = "smtp.google.com";
client.Credentials = new System.Net.NetworkCredential("dnscubes7@gmail.com","msquaredrupeshjisha");
mail.Subject = "this is a test email.";
mail.Body = "this is my test email body";
client.Send(mail);
}
}
Member 10500918
10-Jan-14 3:41am
View
this is my code i'm still getting errors..
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Net;
using System.Net.Mail;
public partial class Default4 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
MailMessage mail = new ("dnscubes7@gmail.com", "niya4422@gmail.com");
SmtpClient client = new SmtpClient();
client.Port = 25;
client.DeliveryMethod = SmtpDeliveryMethod.Network;
client.UseDefaultCredentials = false;
client.Host = "smtp.google.com";
client.Credentials = new System.Net.NetworkCredential("dnscubes7@gmail.com","msquaredrupeshjisha");
mail.Subject = "this is a test email.";
mail.Body = "this is my test email body";
client.Send(mail);
}
}
Member 10500918
10-Jan-14 3:40am
View
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Net;
using System.Net.Mail;
public partial class Default4 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
MailMessage mail = new ("dnscubes7@gmail.com", "niya4422@gmail.com");
SmtpClient client = new SmtpClient();
client.Port = 25;
client.DeliveryMethod = SmtpDeliveryMethod.Network;
client.UseDefaultCredentials = false;
client.Host = "smtp.google.com";
client.Credentials = new System.Net.NetworkCredential("dnscubes7@gmail.com","msquaredrupeshjisha");
mail.Subject = "this is a test email.";
mail.Body = "this is my test email body";
client.Send(mail);
}
}
Member 10500918
10-Jan-14 2:53am
View
i'm getting an error at client.Send(mail); that failure sending mail
Member 10500918
9-Jan-14 6:20am
View
but i'm getting many errors
Member 10500918
8-Jan-14 4:37am
View
thaankksss a loooooooooooooooot for this great information :)
Member 10500918
8-Jan-14 3:58am
View
when i used the same code to encrypt a file....i was only able to encrypt the name of the file.....but not the file itself...
so what all changes should i make in my code
nd my code is this...
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Security.Cryptography;
using System.Web.Security;
using System.Text;
using System.IO;
using System.Data;
using System.Data.SqlClient;
public partial class Default5 : System.Web.UI.Page
{
String sq;
String sq1;
String sq2;
SqlCommand cmd;
SqlCommand cmd1;
SqlCommand cmd2;
SqlConnection cn;
SqlConnection cn1;
SqlConnection cn2;
SqlDataReader sdr;
//ENCRYPTION
private string Encrypt(string plaintext)
{
byte[] rgbIV;
byte[] key;
//byte[] shilpa;
RijndaelManaged rijndael = BuildRigndaelCommon(out rgbIV, out key);
//convert plaintext into a byte array
byte[] plaintextBytes = Encoding.UTF8.GetBytes(plaintext);
//var result = System.Text.Encoding.Unicode.GetBytes(plaintext);
int BlockSize;
BlockSize = 16 * (1 + (plaintext.Length / 16));
Array.Resize(ref plaintextBytes, BlockSize);
// fill the remaining space with 0
for (int i = plaintext.Length; i < BlockSize; i++)
{
plaintextBytes[i] = 0;
}
byte[] cipherTextBytes = null;
//create uninitialized Rijndael encryption obj
using (RijndaelManaged symmetricKey = new RijndaelManaged())
{
//Call SymmetricAlgorithm.CreateEncryptor to create the Encryptor obj
var transform = rijndael.CreateEncryptor();
//Chaining mode
symmetricKey.Mode = CipherMode.CFB;
//create encryptor from the key and the IV value
ICryptoTransform encryptor = symmetricKey.CreateEncryptor(key, rgbIV);
//define memory stream to hold encrypted data
using (MemoryStream ms = new MemoryStream())
{
//define cryptographic stream - contains the transformation key to be used and the mode
using (CryptoStream cs = new CryptoStream(ms, encryptor, CryptoStreamMode.Write))
{
//encrypt contents of cryptostream
cs.Write(plaintextBytes, 0, BlockSize);
cs.FlushFinalBlock();
//convert encrypted data from a memory stream into a byte array
cipherTextBytes = ms.ToArray();
}
}
}
//store result as a hex value
string hexOutput = BitConverter.ToString(cipherTextBytes).Replace("-", "");
hexOutput = hexOutput.Substring(0, plaintext.Length * 2);
//finially return encrypted string
return hexOutput;
}
//DECRYPTION
private string Decrypt(string disguisedtext)
{
byte[] disguishedtextBytes = FromHexString(disguisedtext);
var originalLength = disguishedtextBytes.Length;
int BlockSize;
BlockSize = 16 * (1 + (originalLength / 16));
Array.Resize(ref disguishedtextBytes, BlockSize);
// fill the remaining space with 0
for (int i = originalLength; i < BlockSize; i++)
{
disguishedtextBytes[i] = 0;
}
byte[] rgbIV;
byte[] key;
BuildRigndaelCommon(out rgbIV, out key);
string visiabletext = "";
//create uninitialized Rijndael encryption obj
using (var symmetricKey = new RijndaelManaged())
{
//Call SymmetricAlgorithm.CreateEncryptor to create the Encryptor obj
symmetricKey.Mode = CipherMode.CFB;
symmetricKey.BlockSize = 128;
symmetricKey.Padding = PaddingMode.None;
// ICryptoTransform encryptor = symmetricKey.CreateEncryptor(key, rgbIV);
Member 10500918
8-Jan-14 3:10am
View
what is the difference in the code to encrypt a file and a code to text using rijendael algorithm
Member 10500918
8-Jan-14 3:02am
View
i want to display my pdf file
Member 10500918
8-Jan-14 1:26am
View
should i use a pdf viewer
Member 10500918
8-Jan-14 1:24am
View
yes i used this code..but instead of a pdf file as output it gives me the message "File uploaded successfully."
Show More