Class EbicsSecurityMediumFileSMB

Namespace
Subsembly.EBICS
Assembly
Subsembly.EBICS.Core.dll

Implements IEbicsSecurityMedium for StarMoney Business EBICS key files.

public class EbicsSecurityMediumFileSMB : IEbicsSecurityMedium, IEbicsSecurityMediumStoredContact, IEbicsSecurityMediumPrivKeys
Inheritance
EbicsSecurityMediumFileSMB
Implements
Inherited Members

Remarks

StarMoney Business EBICS key files usually have the name "security_ebics.key". The format is roughly equivalent to the PPI RDH-2 format for HBCI key files.

Fields

CLASSNAME

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

Field Value

string

Properties

CanChangePIN

Indicates whether the password of the key file can be changed.

public bool CanChangePIN { get; }

Property Value

bool

Remarks

Changing the password of a SMB key file is not supported. Therefore this property is always false.

LastError

public EbicsSecurityMediumErrorCode LastError { get; }

Property Value

EbicsSecurityMediumErrorCode

SecurityMedium

Always returns "0100".

public string SecurityMedium { get; }

Property Value

string

SecurityMediumID

public string SecurityMediumID { get; }

Property Value

string

SecurityMediumType

public EbicsSecurityMediumType SecurityMediumType { get; }

Property Value

EbicsSecurityMediumType

State

public EbicsSecurityMediumState State { get; }

Property Value

EbicsSecurityMediumState

StoredContact

public EbicsContact StoredContact { get; set; }

Property Value

EbicsContact

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 EbicsSecurityMediumFileSMB implementation currently only supports the classic EBICS security operations A004, E001 and X001.

Methods

Authenticate(string)

public bool Authenticate(string sPIN)

Parameters

sPIN string

Returns

bool

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.