Class EbicsSecurityMediumFileSMB
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
Properties
CanChangePIN
Indicates whether the password of the key file can be changed.
public bool CanChangePIN { get; }
Property Value
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
SecurityMedium
Always returns "0100".
public string SecurityMedium { get; }
Property Value
SecurityMediumID
public string SecurityMediumID { get; }
Property Value
SecurityMediumType
public EbicsSecurityMediumType SecurityMediumType { get; }
Property Value
State
public EbicsSecurityMediumState State { get; }
Property Value
StoredContact
public EbicsContact StoredContact { get; set; }
Property Value
SupportedSecurityCodes
Provides the set of EBICS security operations that are supported by this security media implementation.
public EbicsSecurityCode SupportedSecurityCodes { get; }
Property Value
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
sPINstring
Returns
ChangePIN(string, string)
Change the password used to protect the key file.
public bool ChangePIN(string sOldPIN, string sNewPIN)
Parameters
sOldPINstringThe old password to be changed. Must not be
null.sNewPINstringThe new password to be assigned. Must not be
null.
Returns
- bool
If the password was changed successfully, then
trueis returned. If not, thenfalseis 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
sSecurityMediaIDstringThe path to the key file to be created. This must not be
nulland must not be an empty string. This must be a valid file name of a non-existing file.sPINstringThe PIN to be assigned to the new file to be created.
Returns
- bool
If the security token was successfully created, then
trueis returned. If creation failed, thenfalseis 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
GetSecurityOperations(EbicsContact)
public IEbicsSecurityOperations GetSecurityOperations(EbicsContact aContact)
Parameters
aContactEbicsContact
Returns
Release()
public void Release()
Select(string)
Select existing key file.
public bool Select(string sSecurityMediaID)
Parameters
sSecurityMediaIDstringThe path to the existing key file to select. This must not be
nulland must not be an empty string. This must be a valid file name of an existing file.
Returns
Exceptions
- ArgumentNullException
The parameter sSecurityMediaID was
null.- ArgumentException
The parameter sSecurityMediaID was an empty string.
- InvalidOperationException
There is already a selected file.