Jagged Arrays

Our dear friend Ms.Asha Bora has done some studies on the wonderful Jagged Arrays..
Lets see what she has to say..

In this Article I will be discussing about Jagged Arrays. Many of us who are working as a Programmer may not be knowing about it, as I didn't knew it. One of my friends told me about Jagged Arrays. So I thought that I should explore myself on this topic so that people like me can know more about it..

.Net supports two types of Arrays:
Single dimensional arrays(Linear)
Multi-dimensional arrays - These are of two type : Rectangular Arrays and Jagged Arrays

What are Jagged Arrays?

A jagged Array is nothing but a multidimensional array, whose elements are arrays. The elements of an array can be of different dimensions and sizes. A jagged array is also known as “array of arrays”. Following is an example to show the declaration and initialization of jagged array:

i. Declaration : int[][] jaggedArray = new int[3][];
       Over here‘3’shows the number of rows in the array.

ii. Initialization: There are many ways to initialize a jagged array. In the given example each of the element is a single dimensional array.

jaggedArray[0] = new int[5];
jaggedArray[1] = new int[4];
jaggedArray[2] = new int[3];


We can also do initialization of the arrays without knowing its size.
For Example :

int[][] jaggedArray2 = new int[][]
{
   new int[] {1,3,5,7,9},
   new int[] {0,2,4,6},
   new int[] {11,22,33}
}
;

We can also do this in the below given way. Notice that we cannot omit the new operator from the elements initialization because there is no default initialization for the elements..

int[][] jaggedArray3 =
{
   new int[] {1,3,5,7,9},
   new int[] {0,2,4,6},
   new int[] {11,22,33}
};

NOTE: A jagged array is an array of arrays, and therefore its elements are reference types and are initialized to null. The length property of the array returns the number of arrays contained in the jagged array.

The following C# example will tell us how we can iterate in a jagged array.

class JaggedArray_Test
{
static void Main()
{
// Declare the array of two elements:
int[][] jaggedarr = new int[2][];

// Initialize the elements:
jaggedarr [0] = new int[5] { 3, 9, 15, 21, 27 };
jaggedarr [1] = new int[4] { 6, 12, 18, 24 };

// Display the array elements:
for (int i = 0; i < jaggedarr.Length; i++)
{
System.Console.Write("Element({0}): ", i);

for (int j = 0; j < jaggedarr [i].Length; j++)
{
System.Console.Write("{0}", jaggedarr [i][j]);
System.Console.Write(“ ”);
}
System.Console.WriteLine();
}
}
}
OUTPUT will be: Element(0) 3 9 15 21 27
Element(1) 6 12 18 24

Difference between multidimensional arrays (also known as rectangular arrays) and jagged arrays:

In a multi-dimensional array we have to declare both dimensions. Suppose we want to store the number of months and the days of each month in an array. If we create a multidimensional array then we have to give a fixed size to both the number of rows and column (To store the number of days for the month).But since each month has different number of days thus declaring the fixed size will lead to wastage of memory. Thus in this case we can use jagged arrays, as we don’t need to declare the second dimension of the array. It is enough to declare just the number of rows (to store number of months) in jagged array. The column or say the size of each linear array will vary as per the requirement.

THUS WE CAN SAY Jagged arrays have certain advantages over rectangular arrays. Jagged arrays are more space efficient, since not all rows (in a two-dimensional array) must have the same number of columns. In addition, since each row has its own one-dimensional array, we can easily pass an individual row to a method that requires a one-dimensional array parameter.
We will find working with jagged arrays much easier if you keep in mind that a jagged array is really an array of arrays.

References :
 http://msdn.microsoft.com/en-us/library/2s05feca(VS.80).aspx
 http://www.odetocode.com/Articles/253.aspx
 http://www.informit.com/guides/content.aspx?g=dotnet&seqNum=128


LINQ : An Introduction

In this article, we will be discussing a very useful Microsoft technology called LINQ..which was introduced with .Net 3.0.

So, Lets see what LINQ is..

LINQ stands for Language Integrated Query. It is Microsoft’s new technology for powerful and easy general purpose data access in a type-safe way.

Now the question arises : What was the need to develop LINQ ??

Well.. the problem was that.. Traditionally, our data source used to determine our selection of a low-level data access API. For example, to fetch relational data from a database table, we would use ADO.NET, to parse XML data, we might use some combination of XPath and XML DOM APIs. Each data access API requires its own specialized syntax (SQL queries, as an example), and typically forces us..the developers to shuffle data between their business objects and the data access API.

All of the diverse data access strategies and APIs means there is a tremendous amount of mental energy expended to build the basic data features needed in every business application. LINQ helps us to eliminate this mental overhead.

Basically, It defines a set of standard query operators in the System.Linq namespace to select, filter, aggregate, and partition data from any type that implements the IEnumerable or IEnumerable <T> interfaces. The standard query operators are compliant with the Common Language Specification (CLS) and work inside any .NET language that supports generics. LINQ gives .Net developers the ability to query and transform data using any .Net Language of their choice.

LINQ is very similar to SQL. So, if you are used to using SQL to query databases, you are going to have something of a head start with LINQ.

This means that whether the data lives in XML, or database, or some collection of objects, we can run through the desired data in a common way..by simply writing SQL like queries.. Query expressions, like “from”, “where”, and “select”, “order by” and all the others you know and love from SQL can now be used in C# and VB .Net.

Lets now jump on to our first code and see how does LINQ code looks like..

In the following C# code, we are using LINQ to query a collection of Strings.

string[] flowers = { "Rose", "Lotus", "Jasmine", "Lily" };
IEnumerable query = from n in flowers
           where n.Length == 4
           orderby n descending
           select n;
foreach (string flower in query)
{
   Console.WriteLine(flower);
}

Inside this code is a LINQ query expression. The code will print out all the flower names in descending alphabetical order. We will discuss on the LINQ syntax in our future article.

The next query produces the same results, but queries data inside an XML fragment.

XElement flowers = XElement.Parse(
        @"<flowers>
           <flowers>Rose</flowers>
           <flowers>Lotus</flowers>
           <flowers>Jasmine</flowers>
          <flowers>Lily</flowers>
         </flowers>"
        );


IEnumerable query = from n in flowers.Elements("flowers")
          where n.Value.Length == 4
          orderby n.Value descending
          select n.Value;
foreach (string flower in query)
{
   Console.WriteLine(flower);
}

Although we made some slight changes to dig into the XML, the operators inside the query expression remains the same. LINQ query expressions are similar to SQL SELECT commands with FROM, WHERE, ORDERBY, GROUP, AND SELECT clauses.

Microsoft also designed LINQ to integrate closely with .NET languages and their environment. When typing the above queries, Visual Studio provides Intellisense for auto-completion. The compiler can perform syntax and type checking on query expressions.

Thus, we discussed the use of LINQ and what LINQ is.. We also saw an example of implementation of LINQ. We will be carrying on with the LINQ in our coming articles..

References :

http://msdn.microsoft.com/
• http://www.odetocode.com/
• http://www.programmersheaven.com/
• http://blogs.msdn.com/cyrusn/



FAQs on SSL Security

Ms. Asha Bora is now answering the frequently asked questions on SSL Security..

01. What is Secure Sockets Layer (SSL)?
Ans. SSL is an abbreviation used for Secure Socket Layer. It protects the data transfer over the http using the cryptography technique by using a server’s SSL certificate.

02. What is cryptography?
Ans. It is an art of protecting information by encrypting it or says by transforming it into a format which we cannot understand. Only those who possess a secret key can decrypt the message into a readable format. Cryptography is used to protect e-mail messages, credit card information and corporate date.

03. Can I try an SSL Certificate before purchasing?
Ans. You can test SSL in a pre-production server environment with a trial SSL Certificate free for 14 days. SGC-enabled and Extended Validation SSL Certificates are not available in a trial version.

04. What encryption strength do I need for my Web site?
Ans. Best security practices are to install a unique certificate on each server and choose a True 128-bit Certificate by purchasing a Server Gated Cryptography (SGC)-enabled SSL Certificate. A unique certificate keeps your private keys protected, and an SGC-enabled certificate ensures that every site visitor, no matter what browser or operating system they use, connects at the highest level of encryption their system is capable of. You need 128-bit or better encryption if you process payments, share confidential data, or collect personally identifiable information such as social security or tax ID number, mailing address, or date of birth. You need 128-bit or better encryption if your customers are concerned about the privacy of the data they send to you.

05. What do we mean by High Assurance Certificates?
Ans. High Assurance Certificates are fully authenticated certificates that produce confidence and trust. They have a 4 step authentication and verification process that verifies the domain name and company legitimacy. A visitor is fully satisfied that his information or transaction is fully secured if a website has a HA Cert. These are used by e-commerce websites with high value transactions and where there is sharing of confidential data. Information such as the Domain ownership, Company name, Address, Expiry date of the Certificate and Details of the CA are included within the certificate.

SSL Genie's Premium Certificates, VeriSign® SSL Certificates etc. are high assurance certificates for high risk high value transaction segment.

06. I want to buy the most basic entry level certificate. Which Certificate should I buy?
Ans. Flash SSLGenie Domain Validated certificates, VeriSign® Secure Site certificate etc. are the entry level certificates that provide medium level security. It is a one step verification and authentication process that verifies only the domain name. The domain is validated using an automated system they are used by websites which have a transfer of low value transactions and information which is not highly confidential.

07. What is the benefit of buying a site seal?
Ans. The site seal allows your customers to identify and confirm that your web site is using a leading SSL certificate. The seal resides on your web pages, identifying your site as genuine, authentic and validated by an independent third- party. The various advantages of having the site seal on your website are :

• By clicking on the SSL Trusted Site Seal visitors will get real-time confirmation of the validity of the certificate on the web server that they are connected to.
• It is a secure image with a direct link to the certificate server for verification.
• Tells customers that they can trust their online transactions conducted with you.
• Can be displayed on multiple secure pages.
• Is simple to install.
• Contains a date stamp reflecting your customer's time zone, providing real-time assurance of the authenticity of your site.

08. What is an SSL VPN?
Ans. An SSL VPN (Secure Sockets Layer Virtual Private Network) is a form of VPN that can be used with a standard Web browser. In contrast to the traditional IPsec (Internet Protocol Security) VPN, an SSL VPN does not require the installation of specialized client software on end users' computers.

The SSL VPN can be a good choice for schools, libraries and public kiosks where trust can be an issue but easy access is also important. Applications include Web-based e-mail, business and government directories, databases for educational institutions, file sharing, remote backup, remote system management and consumer-level e-commerce.

SSL Genie Certificates are specifically suited for this purpose.

09. How can I come to know if the website I am on is SSL safe?
Ans. When a user enters a site that is SSL enabled, he will see a "pad lock" at the browser's status bar indicating that the page is protected by SSL. When a site is SSL enabled, it means that the data transmitted between the browser and the site is encrypted. For example, Web image's signup page is SSL enabled.


When a website has an SSL Certificate integrated, its address normally starts with https:// instead of the regular http://. The addition of "s" indicates that the connection to the website's server is now secure and private data that is entered into the website can't be read by anyone except those authorized to read it.

10. What is the difference between SSL and s-http?
Ans. Apart from SSL, another protocol for transmitting data securely over the World Wide Web is Secure HTTP (S-HTTP). Whereas SSL creates a secure connection between a client and a server, over which any amount of data can be sent securely, S-HTTP is designed to transmit individual messages securely. SSL and S-HTTP, therefore, can be seen as complementary rather than competing technologies. Both protocols have been approved by the Internet Engineering Task Force (IETF) as a standard.

References :

• http://www.livehelpgenie.com/
• www.verisign.com/ssl/ssl-information-center/how-ssl-security-works


String Equality and Interning

In the previous article on “Strings : Java and C#”, I had discussed the concept of strings, and some common functions for string manipulation. This time, I will be mainly talking on string equality, and about string interning.

So, Lets start with string equality first.. But before starting, keep in mind.. that java or C#.. Strings are nothing but references.

Now.. Because of the transparent optimizations performed by runtime, its very necessary to know when 2 strings are equal. Strings can be compared by comparing string instances, object instances, and their values. The default comparison operations in both C# and Java compare the string's values instead of the object references.

Lets try to understand this by the following C# program.

using System;

public class StringTest
{


public static void Main(string[] args)
{

char[] c = new char[] {'H','e','l','l','o'};
string[] strings = new string[4];
strings[0] = "Hello";
strings[1] = "World";
strings[2] = "Hello";
strings[3] = new string(c);

Console.WriteLine("-----[ Comparing strings using ==
operator of System.String ]-----");
for (int i =0; i < strings.Length; ++i){
for (int j = i+1; j < strings.Length; ++j){

Console.WriteLine("{0} = {1} {2}",i,j,strings[i] ==
strings[j]);
}
}


Console.WriteLine("-----[ Comparing strings using ==
operator of System.Object ]-----");
for (int i =0; i < strings.Length; ++i){
for (int j = i+1; j < strings.Length; ++j){

Console.WriteLine("{0} = {1}{2}",i,j,
(object)strings[i] ==
(object)strings[j]);
}
}


Console.WriteLine("-----[ Comparing String using the Equals
method ]-----");
for (int i =0; i < strings.Length; ++i){
for (int j = i+1; j < strings.Length; ++j){

Console.WriteLine("{0} = {1}{2}",i,j,
strings[i].Equals(strings[j]));
}
}
}
}

The output of above code is :

-----[ Comparing strings using == operator of System.String ]-----
0 = 1 False
0 = 2 True
0 = 3 True
1 = 2 False
1 = 3 False
2 = 3 True
-----[ Comparing strings using == operator of System.Object ]-----
0 = 1False
0 = 2True
0 = 3False
1 = 2False
1 = 3False
2 = 3False
-----[ Comparing String using the Equals method ]-----
0 = 1False
0 = 2True
0 = 3True
1 = 2False
1 = 3False
2 = 3True

In C#, the == operator of the System.Object method compares the references of the objects and returns true if the two references point to the same object, and false otherwise. The == operator is overloaded in the System.String class to compare the value of the strings instead of the actual objects they refer to. Therefore, in example above, strings[3] == strings[0] returns true because they have the same string value. However, when both strings[0] and strings[3] are cast to the object and then compared using the == operator, they return false. This is because strings[3] points to a different string object.

C# also has the Equals method, which is similar in behavior to the == operator. Notice in the output of above code that comparing strings using the Equals method and the overloaded == operator gives the same results.

Java programmers must be particularly careful when dealing with the == operator and C# strings.

Note that in Java the equals method functions the same way as the == operator of C#. The equals method is defined on java.lang.Object, and by default it compares the object references. However, the java.lang.String class overrides the equals method and compares the String values.

Coming to string interning now..

String Interning is a method of storing only one copy of each distinct string value, which must be immutable.
Simply stated: string interning keeps a hashtable of strings while running an application. If a string with the same contents is created, no new heap allocation happens but instead a reference to the existing (identical) string is returned.

String interning is supported by most of the modern object-oriented programming languages, including Python, Ruby (with its symbols), Java and .NET languages.

The single copy of each string is called its 'intern' and is typically looked up by a method of the string class, for example String.intern() in Java, and in C# as well.

String equality and interning is very much related to each other.. Lets see how..

Both Java and C# support String interning, so both the JVM and the CLR create only one object from a String that has the same value. This is an optimization feature so that different String references pointing to the same literal value are internally stored as pointing to the same String object. Interning saves RAM at the expense of more CPU time to detect and replace duplicate Strings. There is only one copy of each String that has been interned, no matter how many references point to it. Because Strings are immutable, the intern process is free to further save space, for example, by not creating a separate String literal for "yoddha" when it exists as a substring of some other literal such as "tech yoddha". It also speeds up the String equality compares. Interned Strings will compare faster even if you use equals instead of ==.

The intern Gotcha

All String literals present at compile time are automatically interned. It is only Strings generated on the fly as the program runs that might not be interned. A nasty side effect of this behaviour is that a program will work fine for some simple cases, but fail on complex ones. The problem comes if you used == to test for String equality where you should have used equals. The wrong code will still work much of the time because most String literals are naturally interned.

Manual Interning

It can be implemented by using intern() method. But its not advised to try and implement interning manually.. The big problem with intern is once you intern a String, you are stuck with it in RAM until the program ends. It is no longer eligible for garbage collection, even if there are no more references to it. If you want a temporary interned String, you might consider interning manually.

However, in the most recent JVMs, the interned string cache is now usually implemented in soft references fashion, so that interned strings may become eligible for garbage collection as soon as they are no longer strongly referenced.

Further References :

• http://book.javanb.com/NET-For-Java-Developers-Migrating-To-Csharp/ 0672324024_ch12lev1sec2.html


• http://mindprod.com/jgloss/interned.html


• http://javatechniques.com/



How SSL works?

Ms. Asha Bora continuing with the SSL Security..

In my last article I wrote about “what is SSL Security?” I hope you all have understood it.. So now continuing with SSL Security, lets discuss about “How SSL Works?

As I had written earlier, Secure Sockets Layer (SSL) technology protects our Web site. Also it makes it easy for our Web site visitors to trust us in the following three essential ways:
  1. An SSL Certificate enables encryption of sensitive information during online transactions.
  2. Each SSL Certificate contains unique, authenticated information about the certificate owner.
  3. A Certificate Authority verifies the identity of the certificate owner when it is issued.
Now the question arises: How Encryption Works?

Suppose we are sending a mail through the postal system in a clear envelope. Anyone with access to it can see the data. If it looks valuable, they might even take it or change it.

Our postage of data on the internet is just as unsafe as this envelope is. An SSL Certificate actually protects our data. It establishes a private communication channel enabling encryption of the data during transmission. Encryption jumbles the data, in order to create an envelope for message privacy.

As I had mentioned earlier, each SSL Certificate consists of a public key and a private key. The public key is used to encrypt information and the private key is used to decipher it.

When a Web browser points to a secured domain, a Secure Sockets Layer handshake authenticates the server (Web site) and the client (Web browser). An encryption method is established with a unique session key and secure transmission can begin.

How Authentication Works?

Just think of receiving an envelope with no return address, containing a form asking for our bank account number.

Here also, SSL comes to the rescue.. Every SSL Certificate is created for a particular server in a specific domain for a verified business entity. When the SSL handshake (Exchange of information) occurs, the browser requires authentication information from the server.

By clicking the closed padlock in the browser window or certain SSL trust marks the Web site visitor sees the authenticated organization name. In high-security browsers, the authenticated organization name is prominently displayed and the address bar turns green when an Extended Validation SSL Certificate is detected. If the information does not match or the certificate has expired, the browser displays an error message or warning.

Why Authentication Matters?

Like a passport or a driving license, an SSL Certificate is issued by a trusted source, known as the Certificate Authority (CA). Many CAs simply verify the domain name and issue the certificate.

This was all about the working of SSL security.. In my next article I will be dealing with “FAQ’s on SSL”.

References :

  • www.verisign.com/ssl/

Strings : Java and C#

In this article, I would be discussing with you the concept of strings.. and what does modern programming languages like Java and C# have in store for String manipulation.

Let's first start with understanding “what is a String".

A string is basically a sequence or a string of Unicode characters. It is one of the most common data types that a programmer deals with. Input validation, text analysis and file conversions are several direct applications of string manipulation.

In some languages such as C, strings are treated as character arrays. Whereas, Java and C#, works with complete strings and treat them as objects.

Let’s now move on to discuss the implementation of strings in java and C#.

Strings in Java :

For string manipulation in java, in java.lang package we have a class called String which extends Object class. String objects are created so as to store character sequences. It may contain null as well.

String Class is immutable, i.e. Strings in java, once created and initialized, cannot be changed on the same reference. A java.lang.String class is final which implies no class can extend it. The java.lang.String class differs from other classes. One difference being that the String objects can be used with the += and + operators for concatenation.

A simple String can be created using a string literal enclosed inside double quotes as shown :

String str = "Tech Yoddha";

Or by passing some characters to the constructor like this :

String str = new String("Tech Toddha");

Since a string literal is a reference, it can be manipulated like any other String reference. The reference value of a string literal can be assigned to another String reference.

If 2 or more Strings have the same set of characters in the same sequence then they share the same reference in memory. Such strings are said to be interned, meaning that they share a unique String object. The String class maintains a private pool where such strings are interned.

I will be discussing more on String Interning in my upcoming article. As of now, lets continue with String creation..

Constructing String objects can also be done from arrays of bytes, arrays of characters, or string buffers. A simple way to convert any primitive value to its string representation is by concatenating it with the empty string (""), using the string concatenation operator (+).

String class contains many useful methods for string manipulation. Lets see some of the them :

boolean equals(Object obj) and boolean equalsIgnoreCase(String str) : The comparison using equals() is case-sensitive. To perform a comparison that ignores case differences, call equalsIgnoreCase( ).

Example:

String s1 = "Hello";
String s2 = "Hello";
String s3 = "Good-bye";
String s4 = "HELLO";
System.out.println(s1 + " equals " + s2 + " -> " + s1.equals(s2));
System.out.println(s1 + " equals " + s3 + " -> " + s1.equals(s3));
System.out.println(s1 + " equals " + s4 + " -> " + s1.equals(s4));
System.out.println(s1 + " equalsIgnoreCase " + s4 + " -> “+s1.equalsIgnoreCase(s4));

• int length() : This function returns an int which is the number of characters present in a String variable.

Example:

String str = "Tech yoddha";
System.out.println("Length : "+str.length);
//output : 11

• int compareTo(String str) and int compareToIgnoreCase(String str) : This method is used to compare two strings.
It returns 0 if both strings are same,
It returns a negative value if first string is less than the second string and
It returns a positive value if first string is greater than the second string.

Example:

String smaller = "abc";
String greater = "bcd";
If(greater.compareTo(smaller) >0)
System.out.println(greater+" is greater than "+smaller);
else
System.out.println(greater+" is lesser than "+smaller);
// output: bcd is greater than abc

• String replace(char oldChar, char newChar) : This method is used to replace a character with another character throughout the string.

Example:


String s1 = "java" , s2 ;
s2=s1.replace('a','#');
Now a in java is replaced by #. So s2 is referring to j#v#.

• boolean startsWith(String prefix) and boolean endsWith(String suffix) : These two methods are used to check respectively whether the string starts with or ends with a particular character combination.

• String trim() : This method is used to remove leading and trailing spaces from a string object.

There are lot more functions in String class for string manipulation like indexOf(), split(), substring(), toUpperCase(), toLowerCase(), charAt() etc.

You can also use StringBuilder and StringBuffer classes for manipulating strings.

Strings in C# :


C# or Java, the basic concept of string remains the same.

Like Java, in C# also, the string type represents a string of Unicode characters. Here, we have System.String class which we can use for string manipulation.

Lets discuss over String class in C# now.

But before that, I want to tell you something about string and String in C#. Many people think that string with a small 's' is different than String with capital 'S'. But actually string is an alias for System.String in the .NET Framework. That means string is same as String.
So, keep in mind that whether you write string or String, to C# compiler both means the same.

Lets continue with class String now..

The methods and features of System.String is similar to java.lang.String, but there are a few different things here.

In C#, Although string is a reference type, the equality operators (== and !=) are defined to compare the values of string objects, not references. This makes testing for string equality more intuitive.

The + operator concatenates strings like this :

string a = "good " + "morning";

The [] operator accesses individual characters of a string:

char x = "test"[2]; // x = 's';

String literals are of type string and can be written in two forms, quoted and @-quoted.

Quoted string literals are enclosed in double quotation marks ("):
"good morning" // a string literal

@-quoted string literals start with @ and are enclosed in double quotation marks. For example:
@"good morning" // a string literal

The advantage of @-quoting is that escape sequences are not processed, which makes it easy to write, for example, a fully qualified file name:
@"c:\Docs\Source\a.txt"
// rather than "c:\\Docs\\Source\\a.txt"

To include a double quotation mark in an @-quoted string, double it:
@"""Ahoy!"" cried the captain." // "Ahoy!" cried the captain.

You may try this example :

// keyword_string.cs
using System;
class test
{
public static void Main( String[] args )
{
string a = "\u0068ello "; // \u0068 is the unicode
representation for letter “h”.

string b = "world";
Console.WriteLine( a + b );
Console.WriteLine( a + b == "hello world" );
}
}

Rest all the functions are more or less same as that in java.lang.String class.

Thus, we learnt the basic concept of Strings.. and how they are implemented in C# and java.. and also discussed a few places where C# String class varies from java String class.

References :
  • http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html
  • http://msdn.microsoft.com/en-us/library/362314fe.aspx
  • http://www.java2s.com/Tutorial/Java/0040__Data-Type/equalsandequalsIgnoreCase.htm

SSL Security

Ms. Asha Bora has done some studies on this topic. Lets see what she has to say..

In this 21st century where Internet has become the largest mode of retrieving and storing information, the security of the user information has become a necessity. To provide this security, Netscape has developed a protocol known as SSL.


What is SSL Security???

SSL is an abbreviation used for Secure Socket Layer. It is a protocol developed by Netscape for transmitting private document via Internet with full security.SSL uses a cryptographic technique that uses two keys to encrypt data:
  • A public key : which is known to everyone and
  • A private key or we can say it as a secret key : which is known only to the recipient of the message.
Many Websites now a days use this protocol to keep the data confidential. All the popular browsers like Internet Explorer, Netscape Browsers support SSL. It is easy to tell when a server is using SSL security. This is because URL that require an SSL connection start with “https:” instead of “http:”. “s” stands for secure connection.

We also have another protocol for transmitting data securely over the Internet; it is Secure –HTTP(S-HTTP). The only difference between the two is that SSL creates a secure connection between a client and a server, over which any amount of data can be transmitted where as we can pass only individual messages securely via S- HTTP.

Thus we can say that both the SSL and SHTTP are complementary to each other.

Now the Question arises that, when do we need SSL?
  • We need SSL when we have an Online Store which accepts credit cards etc.,
  • When some data is to be kept private like the account information of a customer of a bank.
  • When we process some sensitive data such as address, telephone no. etc.
This was just a basic introduction to "SSL Security". In my upcoming articles I will be discussing about “How SSL Works? “And “FAQ’s on SSL “.

Further Reference :