Sunday, 6 May 2018

Benefits of Using Cryptography

1. Confidentiality − Encryption technique can guard the information and communication from unauthorized revelation and access of information.
2. Authentication − The cryptographic techniques such as MAC and digital signatures can protect information against spoofing and forgeries.

3. Data Integrity − The cryptographic hash functions are playing vital role in assuring the users about the data integrity.

4. Non-repudiation − The digital signature provides the non-repudiation service to guard against the dispute that may arise due to denial of passing message by the sender.

Types of Cryptography?

Cryptography को Mainly दो Parts मे Divide किया जाता है |
1. Symmetric Cryptography - इसमें Encryption और Decryption दोनों की Keys Same होती है मतलब की इसमें एक ही Key का इस्तेमाल करके Data या information को Encrypt और Decrypt किया जाता है |



2. Asymmetric Cryptography -  इसमें Encryption और Decryption दोनों की Keys Same नहीं होती है मतलब की इसमें Encryption करने के लिए Public Key का इस्तेमाल किया जाता है और Decryption करने के लिए Private Key का इस्तेमाल किया जाता हैं |

What is Decryption in Cryptography?

Cryptography मे Decryption एक ऐसी प्रक्रिया होती हैं जिसमे की Encrypted Data को वापस Plain Text मे Convert किया जाता है | Cipher Text को Plain Text मे Convert करने की Process को Decryption कहा जाता है |

What is Encryption in Cryptography?

Cryptography मे Encryption एक ऐसी प्रक्रिया होती है जिसमे की Data या information को Unreadable Secret Codes मे Convert कर दिया जाता है और इस Converted Data को Cipher Text कहा जाता है और इसको आसानी से समझा नहीं जा सकता क्योंकि यह मशीनी भाषा मे होता है | इसे सिर्फ वही व्यक्ति समझ सकता है जिसके पास इस Encrypted हुए Data को Decrypt करने की Key मौजूद हो मतलब की इसे वापस Plain Text मे Convert करने की Key हो | Plain Text को Cipher Text मे Convert करने की Process को ही Encryption कहा जाता है |

What is Cryptography in Hindi?

Cryptography शब्द Greek शब्द Krypto से बना है जिसका मतलब "Hidden Secrets" होता है | आसानी से शब्दों मे Cryptography का मतलब होता है "The Art of Protecting Data / Information" | इसके द्वारा आप अपने Data को Unreadable Secret Codes मे बदल सकते हैं जिन्हे Cipher Text कहा जाता है और इस Data को वही Read कर सकता है जिसके पास इसको Decrypt करने की Secret Key होगी | Decrypt हुए Data को Plain Text कहा जाता है | इसमें Encryption और Decryption दो Process होती है | इसका इस्तेमाल E-Mail Messages, Credit/Debit Card की Details तथा अन्य महत्वपूर्ण information को protect करने के लिए किया जाता है | Encryption मे Plain Text को Cipher Text मे Convert किया जाता है तथा Decryption मे Cipher Text को Plain Text मे Convert किया जाता है |

Sunday, 1 April 2018

Send OTP ( One Time Password ) SMS to Verify user Mobile Number in Asp.Net C#

Important Namespaces Used
--------------------------

using System.Net;
using System.Data;
using System.Data.SqlClient;
using System.Collections.Specialized;


---------------------------


(Send Otp) Button Click Event Coding
--------------------------------------

Panel1.Visible = false;
        Panel2.Visible = true;
        Random random = new Random();
        int value = random.Next(1001, 9999);
        string destinationaddr = "91" + TextBox1.Text;
        string message = "Your OTP Number is " + value + " ( Sent By : Coding Logic and Syntax )";
        //Label3.Text = message;
        String message1 = HttpUtility.UrlEncode(message);

        using (var wb = new WebClient())
        {
            byte[] response = wb.UploadValues("https://api.textlocal.in/send/", new NameValueCollection()
                {
                {"apikey" , "FammnpFW0Ks-gRKkiQvnke2nG940NkDbbl4jUV4elK"},
                {"numbers" , destinationaddr},
                {"message" , message1},
                {"sender" , "TXTLCL"}
                });
            string result = System.Text.Encoding.UTF8.GetString(response);
            Session["otp"] = value;


        }


--------------------------------------


( Verify ) Button Click Event Coding
--------------------------------------

 if(TextBox2.Text==Session["otp"].ToString())
        {
            Panel2.Visible = false;
            Label3.Text = "Your Mobile Number Has Been Verified Successfully - Thanks";
        }
        else
        {
            Label3.Text = "OTP Number is Not Correct : Your Mobile Number not Verified";
            Panel2.Visible = true;
        }


----------------------------------------

Thursday, 29 March 2018

Register complain online

Important Namespaces Used
---------------------------

using System.Data;
using System.Data.SqlClient;

--------------------------

Class Level Variable
---------------------

 static int complaintid;

--------------------

Page Load Coding
--------------------

 getcomplaintid();
        Label3.Text = DateTime.Now.ToLongDateString().ToString()+" "+DateTime.Now.ToLongTimeString().ToString();

---------------------

Register Button Click Event Coding
------------------------------

String query = "insert into complaintdetail(complaintid,registerdatetime,cname,complaintdetail,status) values(" + complaintid + ",'" + Label3.Text + "','" + TextBox1.Text + "','" + TextBox2.Text + "','Under Processing')";
        String mycon = "Add your connection";
        SqlConnection con = new SqlConnection(mycon);
        con.Open();
        SqlCommand cmd = new SqlCommand();
        cmd.CommandText = query;
        cmd.Connection = con;
        cmd.ExecuteNonQuery();
        TextBox1.Text = "";
        TextBox2.Text = "";
        Label4.Text = "Your Complaint ID is " + complaintid + " . You can Check the Status of Complaint Using Complaint ID";
----------------


User Defined Method Used
--------------------------

public void getcomplaintid()
    {
        String mycon = "Add your connection";
        SqlConnection scon = new SqlConnection(mycon);
        String myquery = "select complaintid from complaintdetail";
        SqlCommand cmd = new SqlCommand();
        cmd.CommandText = myquery;
        cmd.Connection = scon;
        SqlDataAdapter da = new SqlDataAdapter();
        da.SelectCommand = cmd;
        DataSet ds = new DataSet();
        da.Fill(ds);
        scon.Close();
        if (ds.Tables[0].Rows.Count < 1)
        {
            complaintid = 10001;

        }
        else
        {



             String mycon1 = "Add your connection";
            SqlConnection scon1 = new SqlConnection(mycon1);
            String myquery1 = "select max(complaintid) from complaintdetail";
            SqlCommand cmd1 = new SqlCommand();
            cmd1.CommandText = myquery1;
            cmd1.Connection = scon1;
            SqlDataAdapter da1 = new SqlDataAdapter();
            da1.SelectCommand = cmd1;
            DataSet ds1 = new DataSet();
            da1.Fill(ds1);
            int a;
            a = Convert.ToInt16(ds1.Tables[0].Rows[0][0].ToString());
            a = a + 1;
            complaintid = a;
            scon1.Close();
        }
     
    }

Banking System Project

//*************************************************************** //                   HEADER FILE USED IN PROJECT //********************...