Class SmartcardSession

Definition

Namespace:
Tizen.Network.Smartcard
Assembly:
Tizen.Network.Smartcard.dll
API Level:
3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/secureelement

The class for the Smartcard session information. It allows applications to handle the session information.

C#
Copy
public class SmartcardSession : IDisposable
Inheritance
System.Object
SmartcardSession
Implements
System.IDisposable

Properties

View Source

Atr

The Answer to Reset (ATR) of this secure element.

Declaration
C#
Copy
public byte[] Atr { get; }
Property Value
Type Description
System.Byte[]
API Level: 3
View Source

IsClosed

Whether the session is closed.

Declaration
C#
Copy
public bool IsClosed { get; }
Property Value
Type Description
Boolean
API Level: 3
View Source

Reader

The reader object that provides the given session.

Declaration
C#
Copy
public SmartcardReader Reader { get; }
Property Value
Type Description
SmartcardReader
API Level: 3

Methods

View Source

Close()

Closes the connection with the secure element.

Declaration
C#
Copy
public void Close()
Exceptions
Type Condition
System.NotSupportedException

Thrown when the Smartcard is not supported.

System.InvalidOperationException

Thrown when the method failed due to invalid operation.

API Level: 3
View Source

CloseChannels()

Closes any channel opened on the given session.

Declaration
C#
Copy
public void CloseChannels()
Exceptions
Type Condition
System.NotSupportedException

Thrown when the Smartcard is not supported.

System.InvalidOperationException

Thrown when the method failed due to an invalid operation.

API Level: 3
View Source

Dispose()

Dispose

Declaration
C#
Copy
public void Dispose()
API Level: 3
View Source

Finalize()

SmartcardSession destructor.

Declaration
C#
Copy
protected void Finalize()
View Source

OpenBasicChannel(Byte[], Byte)

Gets an access to the basic channel, as defined in the ISO/IEC 7816-4 specification (the one that has number 0).

Declaration
C#
Copy
public SmartcardChannel OpenBasicChannel(byte[] aid, byte p2)
Parameters
Type Name Description
System.Byte[] aid

The byte array containing the Application ID(AID) to be selected on the given channel.

System.Byte p2

P2 byte of the SELECT command if executed.

Returns
Type Description
SmartcardChannel

The SmartcardChannel object for the basic channel.

Exceptions
Type Condition
System.NotSupportedException

Thrown when the Smartcard is not supported.

System.InvalidOperationException

Thrown when the method failed due to invalid operation.

API Level: 3
View Source

OpenLogicalChannel(Byte[], Byte)

Open a logical channel with the secure element, selecting the Applet represented by the given application ID (AID).

Declaration
C#
Copy
public SmartcardChannel OpenLogicalChannel(byte[] aid, byte p2)
Parameters
Type Name Description
System.Byte[] aid

The byte array containing the Application ID(AID) to be selected on the given channel.

System.Byte p2

P2 byte of the SELECT command if executed.

Returns
Type Description
SmartcardChannel

The SmartcardChannel object for the logical channel.

Exceptions
Type Condition
System.NotSupportedException

Thrown when the Smartcard is not supported.

System.InvalidOperationException

Thrown when the method failed due to an invalid operation.

API Level: 3

Implements

System.IDisposable