Posts

Showing posts with the label java

What is TLS and digital certificates, How to secure your website using https

Image
  As per the internetsociety.org Transport Layer Security (TLS) is a cryptographic protocol that provides end-to-end security of data sent between applications over the Internet. TLS encrypts data sent over the Internet to ensure that eavesdroppers and hackers are unable to see what you transmit which is particularly useful for private and sensitive information such as passwords, credit card numbers, and personal correspondence TLS is normally implemented on top of TCP in order to encrypt Application Layer protocols such as HTTP, FTP, SMTP and IMAP. TLS used in HTTP is called HTTPS, where the additional 'S' represents secure connection. In HTTP the communication is plain and unecrypted, anyone connected to the same network and access to network logs can see the data you are sending. But using HTTPS lets your data encrypted at client and can be decrypted only at sever end, so even anyone eaves drops on your network, all they can see is the encrypted data. A typical https h...

A brief introduction on java.time package introduced in Java 8

Image
  If you have ever worked with the java.util.Date data types for java web applications, some or the other time you might have faced the time zone issues. Lets take the below example to understand one of the issue associated with this data type You have a web application which the user needs to enter the date of birth in UI, and the backend API persists this into DB Lets say User has born on June 15th 1978, 8:30PM in New Jersey, USA. lets say now the user is present in Japan his DOB is not going to change according to the Japan timezone. It is still the same fact that he was born on the date, time and location. But if we use the java.util.Date data type for the DOB in java application, when ever the input date converts into Date data type in the backend java application java.util.Date will actually adds the timezone based on the location the application is running, for example in the above scenario if user sends the input as 1978-06-15T22:30:00 to the backend, and the backend applic...