Cla: 80 - command class Ins: A8 - instruction code P1: 00 P2: 00 Lc: 14 - length of the data field Data:831236A0400000000000140036D3EC3906430643 - data field with tag 83 containing the concatenation of values in the same order as they are listed in the PDOL element of the command to SELECT RESPONSE. Let us look into them in the same order as they are set out in the example: Tag9F66: Terminal Transaction Qualifiers: 36A04000 - the terminal tells about the card and its functionality.
Tag 9F02: Transaction Amount: 000000000100 - amount of the transaction. 1.00 rupees.
Tag9F37: Unpredictable Number: 36D3CE38 - random number generated by the terminal.
Tag 5F2A: Terminal Country Code: 0524 - code of the transaction currency, Nepalese Rupee
Tag 9F1A: Terminal Country Code: 0524 - country of the terminal, Nepal
The Card's Response to the command to GPO follows:
Tag 77: Response Message Template Format 2 - format of the data presentation in the response
Tag 82: Application Interchange Profile: 2000 - profile of the card application where its functionality is described.
Tag 57: Track 2 Equivalent Data: 4804123456789004D23122011676600000671F - equivalent of the magnetic stripe's second track. its structure includes:
PAN = 4804123456789004 - card number
Separator field = D - separator
Expiry Date = 23/12 - card expiry date. Through December 2023.
Service Code = 201 - service code.
Discretionary Data = 1676600000671F - discretionary data where the CVV/CVV2 can be encoded.
Tag 5F20: Cardholder Name: 202F - name of the cardholder.
Tag 5F34: Application PAN Sequence Number: 01 - sequence number of the card. its initial purpose was to be used in the profiles that have more than one application on one physical card. Currently, it is often used in cryptographic procedures related to card authenticity verification by the issuer's host.
Tag 9F10: Issuer Application Data: 06011103A00000 - data of the card application. its structure includes:
Length Indicator = 06
Derivation Key Index = 01
Cryptogram Version Number = 11
Card Verification Results (CVR) = 03A00000 - dynamic object based on the previous steps of exchange within the transaction.
Tag 9F26: Application Cryptogram (AC): A4933D887F0065CE
Tag 9F27: Cryptogram Information Data (CID): 80
Tag 9F36: Application Transaction Counter (ATC): 004E - card transactions counter. Digital value: 78.
Tag 9F6C: Card Transaction Qualifiers: 3E00 - CTQ describing the card capabilities.
Tag 9F6E: Form Factor Indicator: 20700000 - the object describes the technological type of this particular mean of payment.
=> The PIN block is the block of encoded data (i.e., PAN, PIN ). When the cardholder inputs his PIN on any terminal (i.e., ATM, POS etc.), we need to make sure that this PIN is safe and securely reached from the terminal to the acquirer and then the issuer.
There are different standards for building such blocks of data. One of the most commonly used standards for encoding data is ISO 9564-1 format 0 (i.e., ANSI X9.8, VISA-1, and ECI-1).
The steps for encoding this type of Encoding are as follows:
Format of a 16 bytes PIN is : [0][Length][PIN][Padding] where, [0] indicates ISO-0 format. [Length] is the one-byte length of the PIN. [PIN] is the provided PIN by the cardholder. [Padding] is generally used as 'F'.
So, For a PIN '123456', the padded PIN should be: '06123456FFFFFFFF'.
Format of a 16 bytes PAN is : [0000][12 digit PAN] where, [12-digit PAN] should be getting by choosing the 12 rightmost digits of the PAN number (excluding the check digit).
So, For a PAN '1234567890123456', the padded PAN should be: '0000456789012345'.
Calculate the XOR of the padded PIN and the padded PAN should be the PIN block. here, 06123456FFFFFFFF XOR 0000456789012345 = 0612713176FEDCBA
'0612713176FEDCBA' is the PIN block.
There are several other PIN Block formats out there. For more information please visit ISO 9564 .
The .NET Core is the latest version of Microsoft's .NET Framework, which is a free, open-source, general-purpose programming platform. It's a cross-platform framework that works with windows, Mac OS X, and Linux. The .NET core framework may be used to create a variety of apps, including mobile, desktop, online, cloud, IoT, Machine learning, Microservices, games and more. .NET Core is written from scratch to make it a modular, lightweight, fast and cross-platform Framework.
Q2:
What is the .NET Framework?
The .NET is a Framework, which is a collection of classes of reusable libraries given by Microsoft to be used in other .NET applications and to develop, build and deploy many types of applications on the Windows platform including the following:
Console Applications
Windows Forms Applications
Windows Presentation Foundation (WPF) Applications
Web Applications
Web Services
Windows Services
Services-oriented applications using Windows Communications Foundation (WCF)
Workflow-enabled applications using Windows Workflow Foundation(WF)
.NET Framework Consists of two major Components:
Common Language Runtime(CLR): handles a code execution of the applications.
Base Class Library(BCL): Provides a library of taster and reusable code that developers can use in their applications.
Q3:What is .NET Standard?
The .NET Standard is a specification of .NET APIs that are available on all .NET implementations.
Q4: Explain how code gets compiled in C#?
The .NET is a Framework, which is a collection of classes of reusable libraries given by Microsoft to be used in other .NET applications and to develop, build and deploy many types of applications on the Windows platform including the following:
Console Applications
Windows Forms Applications
Windows Presentation Foundation (WPF) Applications
Web Applications
Web Services
Windows Services
Services-oriented applications using Windows Communications Foundation (WCF)
Workflow-enabled applications using Windows Workflow Foundation(WF)
1. Explains different types of directives with example?
There are mainly three types of angular directives. They are:
Component directive: It is used to specify HTML templates. Example: @component
Attribute directive: It is used to change or modify the behavior of the HTML element. Example: ngModel
Structural directive: It is used to add or remove the HTML element in DOM layout. Example: ngIf
2. What is refactoring?
Refactoring is a technique for changing the name of file and folder and reflect that change all over the project structure without changing the underlying functionality.
3. Explain ng generate?
ng generate is a command which is used to generate components, services, module etc.
Let us consider, we generate a component by using following syntax:
ng generate component component-name
OR
ng g c component-name
4. What is dependency injection?
Dependency injection or DI is a technique in which a class requests dependencies from external sources rather than creating itself.
5. How to navigate from within the component code?
we can navigate from the component code as:
6. What is a constructor in a class?
Constructor is a special kind of function which has no return type and has the same name as a class but in the case of TypeScript constructor keyword is enough. The main functionality of the constructor is to instantiate the object of the class.
7. What is the syntax of ngFor loop?
ngFor is a structural directive that has ability of changing the DOM layout by adding or removing DOM element.
Angular router is a mechanism which enables to build single page applications with multiple views and navigation between these views.
Simply, the process of defining navigation element and their corresponding view is called Routing.
The syntax of angular routing is:
Routing modules have all the path to the views as:
2. What is Single Page Application?
Single page applications (SPA) are the type of web applications that loads single page and only a part of page instead of entire page with every click. It ensures high performance.
Some single page applications are Google, Gmail, Paypal, Facebook, YouTube,GitHub etc.
3. What is the Importance of router-outlet?
Router-outlet is the angular tag which works as a placeholder that loads the different components dynamically based on the current route state. Activated component will takes place inside the router-outlet to load its content. Navigation can be done using router-outlet directives.
4. what is AJAX?
AJAX stands for Asynchronous JavaScript and XML is a technique that is used for creating fast and dynamic web pages. It allows web pages to be updated asynchronously by exchanging small piece of data, this means it updates part of the web page without reloading whole page.
5. How can we make a route as a startup route?
We can make a route as a startup route by bootstrapping module in main.ts file and bootstrapping its component in the app.module class as:
In camel case, the first letter of the first word in the identifier is lower case, while the first letter of subsequent word is uppercase.
eg: camelCase
In pascal case, the first letter of every word in the identifier is upper case.
eg: PascalCase
2. What are directives?
Angular directives are the functions that are used to extend the power of the HTML by giving it new syntax like ngModel, ngIf, etc.
3. What is the use of ngModel and significance of [] and () in ngModel?
ngModel is a inbuilt directive that binds the input, select, textarea, and store the required user value in a variable for future use. It works with two way data binding concept.
(ngModel) : It is used to bind data to the model.
[ngModel] : It is used to bind data to the view.
[(ngModel)] : It is used in bidirectional data binding. (i.e. model to view and vice versa)
4. What are expressions or interpolation?
Expression or interpolation are the type of unidirectional data binding that bind the value to a UI element. Expressions are written inside double curly braces such as {{expression}}.
5. What is the importance of FormsModule?
FormsModule is a module that is used to handle data provided by user. It provides various directives and that helps in changing the behavior of the HTML.
1.Differentiate between dependencies and dev dependencies.
Dependencies are properties that are used in a project that makes program run smoothly. They are used for testing, building and compiling the program.
Dev dependencies contains names and versions of the node modules that are required for the development purpose only.
The main difference between dependencies and dev dependencies are the dependencies are modules which are required at runtime, while dev dependencies are modules which are only used for development purpose.
2.Explain about view, components, modules and models?
View: View is a presentation layer that defines how your user sees and interact with it.
Components: Components are the intermediate building block of angular applications that are used to bind view and model together. Any information is shared between view and model through the components.
Modules: Module is a mechanism that group components, directives, pipes and services that can be combined with other modules to create an application.
Models: Models are used in business logic concept that interact with view through components.
3.What is the industry naming convention for angular file and folder?
It becomes very hard to manage all files and folders without following any standard naming convention. So angular also follows the naming convention that helps to manage and debug lots of files and folders easily. In angular, each folder has its own view, component, module and models.
The folder structure of an angular project is:
4. How does angular application bootstrap ( start )?
Bootstrapping is a technique of initializing or loading angular application. When we create a new angular project then it is launched by using command ng serve . Bootstrap describe how our AppComponent get loaded and displays our first view. It follows following steps in sequence order:
Index.html loads first
index.html file call the main.ts file
main.ts file bootstraps the app.module.ts file
app.module.ts file calls the app.component.ts file
app.component.ts loads its view app.component.html
app.component.html template is injected to the index.html file then we sees our 1st view on the browser.
5. What is a decorator?
Decorators are functions that are used to separate modification or decoration of a class without modifying the original source code. It makes a class an angular component and adds additional metadata information like template, selector name style etc. on it.
6. What is a selector?
Selector is a parameter of a decorator which is used to identify each component uniquely into the component tree. It helps to inject the component to the index.html file.
7. Explain the importance of templateURL?
TemplateURL has the path of the HTML code file. In a complex view selector is not enough, we also need to specify the path where our view resides that need to be injected into index.html through the selector.