Encryption and Decryption

encryption and decryption

As a web developer or programmer, one must get acquaintance with encryption. Encryption is the process of converting information so the information can only be read by the intended recipient and incomprehensible to anyone or in the other words, you make a new code to cover the real information which makes the information becomes private to be understood. The opposite action of encryption is decryption. Decryption is the process of transforming encrypted information so that it is intelligible again. A cryptographic algorithm, also called a cipher, is a mathematical function used for encryption or decryption. In most cases, two related functions are employed, one for encryption and the other for decryption.

The ability to keep information encrypted is not depended on the cryptographic algorithm; however it is because of a number called a key that must be used with the algorithm, in order to produce an encrypted result or to decrypt previously encrypted information. It will be difficult to decrypt some information without having the correct key. In fact, it can be impossible to decrypt without any correct key.

There are two types of key encryption, symmetric-Key Encryption and public-Key Encryption.

Symmetric-Key Encryption

Encryption key can be calculated from the decryption key and vice versa with symmetric-key encryption. The same key is used for both encryption and decryption with most symmetric algorithms. By using key encryption, users do not need to experience any significant time delay as implementations of symmetric-key encryption can be highly efficient.

There is also a degree of authentication which causes symmetric key cannot be decrypted by other symmetric key. It is important to be remembered that symmetric key encryption will be effective only if the symmetric key is kept secret by the two parties involved, the confidentially and authentication of your information can be called into doubt if there is another party figures out of the key. People who can decrypt the message can send information as if they came from one of the two parties who were originally using the key. Symmetric-key encryption is widely used for authentication, tamper detection, and encryption over TCP/IP networks.

Public-Key Encryption

Public-key encryption requires a pair of keys-a public key and a private key-associated with an entity that needs to authenticate its identity electronically or to sign or encrypt data. Each public key is published, and the corresponding private key is kept secret.  The only way to encrypt your data is through your private key only. In general, to send encrypted data to someone, you encrypt the data with that person’s public key, and the person receiving the encrypted data decrypts it with the corresponding private key.

Public key encryption is usually not suitable for large amounts for data since public-key encryption requires more computation compared with symmetric-key encryption. However, it’s possible to use public-key encryption to send a symmetric key, which can then be used to encrypt additional data. This is the approach used by the SSL protocol.

Pros and Cons of Drag and Drop Website Builder

website builder

Nowadays building a website becomes easier and easier, as you can seek for website developers to create a site for you or you can use website builders. However like other things, aside from offering benefits, website builders also provide drawbacks to using builders. Website builders usually apply the CMS (Content Management System) principle, meaning that there is a very clear distinction between the design and content of the site which is suitable for photographers, business, freelancers, bloggers, designers and others with or without a web store. There are two types of web builders; the first type will require you an active internet connection since it is an online type, while the second type is offline web creators. If you haven’t familiar enough with website builders you can take a look on the advantages and the disadvantages of website builder. By knowing the positive and negative sides, you can determine whether you need one or not.

Advantages

  • It makes you be able to instantly look around at your activities. In addition, code is not also a prerequisite. Plus, you are not required to bind with predesigned templates. In short, you will be spared from visual based setting that you find daunting in high-end templates.
  • It increases the visibility of your business. With drag and drop website builders features, you can start having a website to increase the existence of your online business, without the need of any experience on programming or any experience in creating a website.
  • The most interesting thing about drag-and-drop is the simplicity of the interface. Moreover, it is also very easy to use especially for editing the layout of your website.
  • Ideal for small info sites such as company portals, especially the themes. There are also multipurpose services that come with drag and drop builder custom designs and widgets provided by serious providers.
  • A perfect option for personal blogging since it delivers cheap templates.

Disadvantages

Since it is no way for personalized and customized strategies, you may find it not suitable for professional business which may require lots of website customization to meet their own needs and standards. Moreover, you also will find that it also restricts or limits search engine optimization as the automated processes and Flash that they set for standards. As such, they do not permit Google analytics or ecommerce and even other censored contents. Furthermore, drag and drop builder are not able to create a website that commands options for user interaction. This makes professional business opt for the support of a professional developer.

The Magnificent Flexbox

FLEXBOX

Today, there are many design layout method that can help you do many things, but among those methods there is a method that is worth it to try for, named Flexbox, or the Flexible Box Layout. It is a powerful CSS layout module that gives web designers and developers an efficient and simple way to place, align and distribute elements in a container.

Flexbox Basics

Basically, Flexbox is formed by two elements, a flex container (flex parent) and flex items (flex children). A flex container is a containing element (like a div) given the display property flex. Flex items are child elements of a flex container, which can be manipulated through various display properties.

Flex containers and flex items each have their own range of properties that can be combined in different ways to create a range of complex layouts. Items inside a flex container can be laid out horizontally or vertically, aligned and distributed in various ways, and stretched or shrunk to fit the available space. All these options let you easily create responsive layouts.

How to use Flexbox

In order to start using flexbox, you need to first create your flex container (the parent element that will contain your flex items), for example a div block. Let’s add three more div blocks inside our flex container to act as the flex items before we style the element. The items will be stacked at this point.

We can set the parent container’s display property to flex with our child divs in place.

{
display: flex;
}

Layout Directions

The direction your elements will distribute themselves is known as the layout direction. Row acts as the default direction of a flex container, which will display the child elements horizontally. You can switch the layout to vertical by setting the direction to column.

Flex Container {
display: flex;
flex-direction: row;
}

Flex Container {
display: flex;
flex-direction: column;
}

The ‘main’ direction you set on your flex container is referred to whichever direction, while the ‘cross’ direction refers to other direction you didn’t choose. Due to this, the main direction will be horizontal and the cross direction will be vertical.

Flexbox also lets you reverse the layout; Children of a flex container will be laid out right-to-left (if direction is row) or bottom-to-top (if direction is column).

Flex Container {
display: flex;
flex-direction: row-reverse;
}

Flex Container {
display: flex;
flex-direction: column-reverse;
}
This can come in handy, especially if you wish to reserve the layout on smaller screens. For instance, you want to show text on the left side of the screen and an image on the right on desktop screens. This will move the image below the text on mobile. But, you can ensure that the image appears above the text by reversing the direction.

Flex Sizing

Flex users can modify their width or height (depending on the container’s layout direction) to fill available space.

Three options are given by Webflow for flex sizing: shrink if needed, fill empty space, and don’t shrink. Note that each child element can have its own settings, which allows for a plethora of design options.

Flex Item {
flex-shrink: <number>;
flex-grow: <number>;
flex-basis: <length> | auto;
}

Let’s take a look at what each of these options does:

  • Shrink if needed: sizes the item based on its width/height or its content since the item won’t grow larger than it needs to but may shrink to its minimum size to prevent overflow.
  • Fill empty space: ensure the item to fill all available space inside its parent. But, if you set this on all items in a flex container, they’ll expand to take up equal amounts of empty space.
  • Don’t shrink: sizes the item based on its width/height or its content, but doesn’t allow it to shrink, even if that will cause overflow.

Flex items can also have their own alignment settings, which override the default alignment set by their parent flex container. These alignments behave as explained previously.

Flex Item {
display: flex;
flex-direction: row;
align-items: flex-start | flex-end | center | baseline | stretch;

}

Flex items display in the same order as they appear in the source code by default. You can ignore this behavior to ensure elements display with flexbox, in the same order as you want.

There are four main options that you can use:

  • Auto: The default value, which order items as they are in the source
  • First: Item appears first in its flex container
  • Last: item appears last in its flex container
  • Custom: you can customize the order your item will be displayed in

Custom order can be defined as a number. This number will define the order in which the flex item appears inside a flex container.

Flex Item {
order: <integer>;
}