The hash is generated by the client using the client specific secret key using the hash_hmac inbuilt method. This hashed value is included in the request header. Request which include this hash value also have a time stamp field set. The server generates it's own hash based on the request content and the client specific key(… Continue reading HMAC
Why Quick Sort preferred for Arrays and Merge Sort for Linked Lists?
Read this. Identifying Source Origin To identify the source origin, we recommend using one of these two standard headers that almost all requests include one or both of: Origin Header Referer Header Synchronizer (CSRF) Tokens - The synchronizer token pattern requires the generation of random "challenge" tokens (anti-CSRF tokens) that are associated with the user’s… Continue reading CSRF
The general method for shuffling is biased. Check this - https://spin.atomicobject.com/2014/08/11/fisher-yates-shuffle-randomization-algorithm/ and http://www.i-programmer.info/programming/theory/2744-how-not-to-shuffle-the-kunth-fisher-yates-algorithm.html When shuffling the maximum number of possible outcome can't be more then n!( n is the number of items being shuffled). So if the algo generate more then n! possible outcome then the algo is biased. The Knuth Fisher-Yates Algorithm produces unbiased shuffled outcome. It… Continue reading Shuffle an array
Wiki. We will discuss what is it and why we use it and how is it generated. What and Why ? It's basically a way of encoding arbitrary binary data in ASCII text. It takes 4 characters per 3 bytes of data, plus potentially a bit of padding at the end. Essentially each 6 bits… Continue reading Base 64 encode
How is UUID unique(version 1 ) There is more than one type of UUID, so "how safe" depends on which type (which the UUID specifications call "version") you are using. Version 1 is the time based plus MAC address UUID. The 128-bits contains 48-bits for the network card's MAC address (which is uniquely assigned by… Continue reading UUID
Link Stack: Stored in computer RAM just like the heap. Variables created on the stack will go out of scope and automatically deallocate. Much faster to allocate in comparison to variables on the heap. Implemented with an actual stack data structure. Stores local data, return addresses, used for parameter passing Can have a stack overflow… Continue reading Stack vs Heap