Class EbicsSecurityMediumFile

Namespace
Subsembly.EBICS
Assembly
Subsembly.EBICS.Core.dll
public class EbicsSecurityMediumFile : IEbicsSecurityMedium, IEbicsSecurityMediumPrivKeys
Inheritance
EbicsSecurityMediumFile
Implements
Inherited Members

Fields

CLASSNAME

public const string CLASSNAME = "Subsembly.EBICS.EbicsSecurityMediumFile"

Field Value

string

Properties

CanChangePIN

Indicates whether the password can be changed.

public bool CanChangePIN { get; }

Property Value

bool

Changing the password is supported by this implementation and therefor this property is always true.

LastError

public EbicsSecurityMediumErrorCode LastError { get; }

Property Value

EbicsSecurityMediumErrorCode

SecurityMedium

Always is "0100".

public string SecurityMedium { get; }

Property Value

string

SecurityMediumID

public string SecurityMediumID { get; }

Property Value

string

SecurityMediumType

public EbicsSecurityMediumType SecurityMediumType { get; }

Property Value

EbicsSecurityMediumType

Remarks

All implementations derived from this base class implement key file security. Thus, this method always returns File.

State

public EbicsSecurityMediumState State { get; }

Property Value

EbicsSecurityMediumState

SupportedSecurityCodes

Provides the set of EBICS security operations that are supported by this security media implementation.

public EbicsSecurityCode SupportedSecurityCodes { get; }

Property Value

EbicsSecurityCode

Remarks

The EbicsSecurityMediumFile implementation always supports all security operations defined by the EbicsSecurityCode enumeration. However, only those security operations are possible, where there are actually private keys available in the selected key file.

Methods

Authenticate(string)

public bool Authenticate(string sPIN)

Parameters

sPIN string

Returns

bool

Exceptions

InvalidOperationException

There is no file selected.

ChangePIN(string, string)

Change the password used to protect the key file.

public bool ChangePIN(string sOldPIN, string sNewPIN)

Parameters

sOldPIN string

The old password to be changed. Must not be null.

sNewPIN string

The new password to be assigned. Must not be null.

Returns

bool

If the password was changed successfully, then true is returned. If not, then false is returned and LastError provides the details.

Remarks

This security medium must be in the Selected, State when this method is called. It will return back into the Null State, regardless of success or failure.

Exceptions

ArgumentNullException

The parameter sOldPIN or sNewPIN was null.

InvalidOperationException

This security medium instance is not in the Selected state.

Create(string, string)

Creates a new key file.

public bool Create(string sSecurityMediaID, string sPIN)

Parameters

sSecurityMediaID string

The path to the key file to be created. This must not be null and must not be an empty string. This must be a valid file name of a non-existing file.

sPIN string

The PIN to be assigned to the new file to be created.

Returns

bool

If the security token was successfully created, then true is returned. If creation failed, then false is returned and LastError provides more information.

Remarks

This method may only be called when this security medium is in the Null State. If the security token was successfully created, then it will be in the Authenticated State. thereafter.

Exceptions

ArgumentNullException

The parameter sSecurityMediaID or sPIN was null.

ArgumentException

The parameter sSecurityMediaID was an empty string.

InvalidOperationException

There is already a selected file.

GetPasswordInfo()

public EbicsPasswordInfo GetPasswordInfo()

Returns

EbicsPasswordInfo

GetSecurityOperations(EbicsContact)

public IEbicsSecurityOperations GetSecurityOperations(EbicsContact aContact)

Parameters

aContact EbicsContact

Returns

IEbicsSecurityOperations

Release()

public void Release()

Select(string)

Select existing key file.

public bool Select(string sSecurityMediaID)

Parameters

sSecurityMediaID string

The path to the existing key file to select. This must not be null and must not be an empty string. This must be a valid file name of an existing file.

Returns

bool

Exceptions

ArgumentNullException

The parameter sSecurityMediaID was null.

ArgumentException

The parameter sSecurityMediaID was an empty string.

InvalidOperationException

There is already a selected file.