Set Cookies to Expire in 30 Minutes in JavaScript

Prabhas
Updated on 09-Jan-2020 08:07:48

7K+ Views

You can extend the life of a cookie beyond the current browser session by setting an expiration date and saving the expiry date within the cookie. This can be done by setting the ‘expires’ attribute to a date and time.ExampleYou can try to run the following example to set cookies to expire in 30 minutesLive Demo                                                  Enter name:                    

Advanced Encryption Standard (AES)

Moumita
Updated on 09-Jan-2020 07:53:44

2K+ Views

The Advanced Encryption Standard, or AES, is an encryption standard established in 2001 by the National Institute of Standards and Technology (NIST) of USA. It is implemented worldwide both in hardware and software to encrypt sensitive data. AES finds wide usage while transmitting data over computer networks, particularly in wireless networks.Features of AESAES is a subset of Rijndael block cipher.It is a successor of Data Encryption Standard (DES) and is stronger and faster than DES.It is a symmetric key symmetric block cipher.It operates on 128-bit (16 bytes) data.The cipher key may be of 128, 192 or 256 bits.All computations are ... Read More

Wired Equivalent Privacy (WEP)

Moumita
Updated on 09-Jan-2020 07:50:51

4K+ Views

Wired Equivalent Privacy (WEP) is a security standard for wireless networks or WiFi. It was a part of the original IEEE 802.11 protocol. As wireless networks transmit data over radio waves, eavesdropping on wireless data transmissions is relatively easier than in wired networks connected by cables. WEP aims to provide the same level of security and confidentiality in wireless networks as in wired counterparts.Features of WEPWEP was introduced as a part of IEEE 802.11 standard in 1997.It was available for 802.11a and 802.11b devices.WEP uses encryption of data to make it unrecognizable to eavesdroppers.It uses RC4, a stream cipher, for ... Read More

Wi-Fi Protected Access (WPA) and Wi-Fi Protected Access 2 (WPA2)

Moumita
Updated on 09-Jan-2020 07:47:58

583 Views

Wi-Fi Protected Access (WPA) and Wi-Fi Protected Access 2 (WPA2) are security standards to protect network stations connected to WiFi networks. They were developed by WiFi Alliance for delivering sophisticated data encryption technologies and improved user authentication than the pre-existing Wired Equivalent Privacy (WEP).WiFi Protected Access (WPA)Wi-Fi Protected Access (WPA) was supported in IEEE 802.11i wireless networks and was proposed in 2004. It was backward-compatible with the existing WEP that led to its rapid, hassle-free adoption.The encryption method adopted in WPA is the Temporal Key Integrity Protocol (TKIP). TKIP includes per-packet key, integrity check, re-keying mechanism. It dynamically generates an ... Read More

The 802.11 Frame Structure

Moumita
Updated on 09-Jan-2020 07:41:13

25K+ Views

The IEEE 802.11 standard, lays down the architecture and specifications of wireless local area networks (WLANs). WLAN or WiFi uses high frequency radio waves instead of cables for connecting the devices in LAN. Users connected by WLANs can move around within the area of network coverage.The 802.11 MAC sublayer provides an abstraction of the physical layer to the logical link control sublayer and upper layers of the OSI network. It is responsible for encapsulating frames and describing frame formats.MAC Sublayer Frame Structure of IEEE 802.11The main fields of a frame in WLANs as laid down by IEEE 802.11 are as ... Read More

Print Square Inside a Square in C

suresh kumar
Updated on 09-Jan-2020 07:16:17

941 Views

Program DescriptionPrint Square inside a Square as shown belowAlgorithmAccept the number of rows the outer Square to be drawn Display the Outer Square with the number of rows specified by the User. Display another square inside the outer square.Example/* Program to print Square inside Square */ #include int main() {    int r, c, rows;    clrscr();    printf("Enter the Number of rows to draw Square inside a Square: ");    scanf("%d", &rows);    printf("");    for (r = 1; r

Concatenate Several Strings in JavaScript

Ramu Prasad
Updated on 09-Jan-2020 07:13:47

282 Views

To concatenate several string, use “Array.join()” method. Here, we will concat the following strings:John Amit SachinExampleYou can try to run the following code to concat several stringsLive Demo                    var arr = ['Amit', 'John', 'Sachin'];          document.write(arr.join(', '));            

Print Right and Left Arrow Patterns in C

suresh kumar
Updated on 09-Jan-2020 07:01:22

683 Views

Program DescriptionPrint the Right and Left arrow PatternsAlgorithmAccept the number of rows to print the Left and Right Arrow Pattern.Print Upper Part of the Arrow with Stars Patterns Print Inverted Right Triangle with Stars Patterns Print Bottom Part of the Arrow with Stars Patterns Print the Right Triangle with Stars PatternsExample/*Program to print the Left and right arrow pattern*/ #include int main() {    int r, c, rows; //Left Arrow Pattern    int r1, c1, rows1; //Right Arrow Pattern    clrscr();    printf("Enter number of rows to print the Left Arrow Pattern: ");    scanf("%d", &rows);    printf("");    printf("The ... Read More

Difference Between Closure and Nested Functions in JavaScript

mkotla
Updated on 09-Jan-2020 06:52:53

1K+ Views

JavaScript ClosuresIn JavaScript, all functions work like closures. A closure is a function, which uses the scope in which it was declared when invoked. It is not the scope in which it was invoked.Here’s an exampleLive Demo           JavaScriptClosures                       varp = 20;             functiona(){                var p = 40;                b(function(){                   alert(p);             ... Read More

Print Pyramid Pattern in C

suresh kumar
Updated on 09-Jan-2020 06:49:19

4K+ Views

Program DescriptionA pyramid is a polyhedron formed by connecting a polygonal base and a point, called the apex. Each base edge and apex form a triangle, called a lateral face. It is a conic solid with polygonal base. A pyramid with an n-sided base has n + 1 vertices, n + 1 faces, and 2n edges. All pyramids are self-dual.AlgorithmAccept the number of rows from the user to form pyramid shape Iterate the loop till the number of rows specified by the user: Display 1 star in the first row Increase the number of stars based on the number of ... Read More

Advertisements