Skip to main content

Posts

OS

Hardware => Operating system => Application  OS Provide - Hardware Abstraction - Resource management Abstraction: B/W Application and hardware - Easy program writing - Reusable functionality - Portable Resource management - Multiple app but limited resource - Manage CPU, Memory, Network, Secondary Memory etc   --------------- CPU Each have a unique address - Memory addrs - IO Addrs - Memory Mapped IO addrs Memory addrs 32 bit process Range: 0- 2^32-1  ---------------- Process Stack Heap Data Text System call use to access resources of kernel mode  ------------------ Sharing the CPU - Multi-programming and multi-tasking - Sharing in multi-processor environments * Race conditions and synchronization * Scheduling * Isolation of the OS and user programs * Security mechanisms * Access control * Security assessment ------------------- CPU Vs RAM - RAM hold data CPU compute on data Memory Management - Fragmentation: Und...

company list

Food Wingify Branch. io bangalore ( $367M funding ) Goldman Sachs Atlassian Facebook Microsoft Booking Apple Trianz ( $14M funding ) Vahan. ai ( Y-combinator backed up ) Zendrive hopscotch Pramiti Techmojo InsideView MindTickle Agara. ai ( $3M funding ) Mapmyindia Traveloka ShadowFax Swiggy Truebil Yelobank Coolwinks Observe. ai Yulu ( $8M funding ) Roposo ( $32M funding ) Euler Systems Mumbai Quikr Wealthy Sureify ( $7M funding ) Flynote Transbit Gainsight ( $150M funding ) Madstreetden Celigo Tekion ( $11M funding ) Healofy ezetap Kredx ( $7M funding ) Porter ( $13.7M funding ) Idfy ( $4M funding ) RailYatri ( $14M funding ) Cast Software , Bangalore ( $12.5M funding ) Cashfree ( $5M funding ) Robosoft Technologies ( $15M funding ) JustDial Nuawoman Medcords ( $26M funding ) Zeta Mfine ( $ 27M funding ) pristyncare Tr...

Interview

Questions Resume Check integrity of your software  Explain Client server (micro-service architecture) Difference between Go route and Java thread Difference between OS thread and Java thread Cockroach vs Mysql SQL vs NoSQL Distribute  database  DS ALGORITHM Question Find partition index in sorted rotated check array is sorted or not

JCE Provider

Provider Class - Abstract class (Extend from properties class) - Properties class (Extend from HashMap class) Engine Class An engine class provides the interface to a specific type of cryptographic service. cryptographic operations (encryption, etc.) generators or converters of cryptographic material (keys and algorithm parameters), or  objects (keystores or certificates) that encapsulate the cryptographic data and can be used at higher layers of abstraction. The following engine classes are available: SecureRandom: used to generate random or pseudo-random numbers. MessageDigest: used to calculate the message digest (hash) of specified data. Signature: initialized with keys, these are used to sign data and verify digital signatures. Cipher: initialized with keys, these are used for encrypting/decrypting data. There are various types of algorithms: symmetric bulk encryption (e.g. AES), asymmetric encryption (e.g. RSA), and password-based encryption (e.g. PBE). Mess...

HD Wallet key Generation

HD Wallet key Generation Example to generate HD wallet child key in golang. package main import ( "github.com/tyler-smith/go-bip32" "log" "github.com/btcsuite/btcutil/base58" ) func main(){ // root key rootKey := "xpub661MyMwAqRbcFPUpZvj3QydNRASDRHEZ1TyvTkhDTAPqytQLx7j8XWFEsnArLx9rbfHTCcCUfp6K75qcAqkp83ASXnCpiXWT5M6Hcc92wSV" decoded := base58.Decode(rootKey) masterKey, _ := bip32.Deserialize([]byte(decoded)) /* (m) / | \ / | \ m/0 m/1 m/2 ... . . . */ childKey, _ := masterKey.NewChildKey(2) // m/2 log.Println("child key: \n", childKey) }

Hello World in Go

Your First Program Traditionally the first program you write in any programming language is called a “Hello World” program – a program that simply outputs  Hello World  to your terminal. Let's write one using Go. First create a new folder where we can store our program. Create a folder named  ~/src/go_example . (Where  ~  means your home directory) From the terminal you can do this by entering the following commands: mkdir src/go_example touch src/go_example/main.go Using your text editor type in the following in the main.go: package main import "fmt" // this is a comment func main() { fmt.Println("Hello World") } Open up a new terminal and type in the following: cd src/go_example go run main.go You should see  Hello World  displayed in your terminal. The  go run  command takes the subsequent files (separated by spaces), compiles them into an executable saved in a temporary directory and then runs the program....

Android Keystore encryption and decryption

Android Keystore In this post we will learn how to store a key in android provider keystore and encrypt and decrypt. Keystore KeyStore ks = KeyStore.getInstance("AndroidKeyStore"); SecretKey key = new SecretKeySpec(keyByte, alg); KeyStore.SecretKeyEntry secretKeyEntry = new KeyStore.SecretKeyEntry(key); // store key in keystore ks.setEntry( "keyName", new KeyStore.SecretKeyEntry(secretKeyEntry.getSecretKey()), new KeyProtection.Builder(KeyProperties.PURPOSE_ENCRYPT | KeyProperties.PURPOSE_DECRYPT) .setBlockModes(KeyProperties.BLOCK_MODE_GCM) .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE) .build()); // get key from key store SecretKey keyStoreKey = (SecretKey) ks.getKey(" keyName", null); Encryption Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); cipher.init(Cipher.ENCRYPT_MODE, keyStoreKey); byte[] encryptedByte = c...

Python Input Output

Python Input Output We use the print() function to output data to the standard output device (screen). Up till now, our programs were static. The value of variables were defined or hard coded into the source code. To allow flexibility we might want to take the input from the user. In Python, we have the input() function to allow this. The syntax for input() is s = input("Enter value: ") print (s )