Class EbicsSecurityMediumFile
Inheritance
Inherited Members
Namespace: Subsembly.EBICS
Assembly: Subsembly.EBICS.Core.dll
Syntax
public class EbicsSecurityMediumFile : IEbicsSecurityMedium, IEbicsSecurityMediumPrivKeys
Fields
CLASSNAME
Declaration
public const string CLASSNAME = "Subsembly.EBICS.EbicsSecurityMediumFile"
Field Value
Type | Description |
---|---|
System.String |
Properties
CanChangePIN
Indicates whether the password can be changed.
Declaration
public bool CanChangePIN { get; }
Property Value
Type | Description |
---|---|
System.Boolean | Changing the password is supported by this implementation and therefor this
property is always |
LastError
Declaration
public EbicsSecurityMediumErrorCode LastError { get; }
Property Value
Type | Description |
---|---|
EbicsSecurityMediumErrorCode |
SecurityMedium
Always is "0100".
Declaration
public string SecurityMedium { get; }
Property Value
Type | Description |
---|---|
System.String |
SecurityMediumID
Declaration
public string SecurityMediumID { get; }
Property Value
Type | Description |
---|---|
System.String |
SecurityMediumType
Declaration
public EbicsSecurityMediumType SecurityMediumType { get; }
Property Value
Type | Description |
---|---|
EbicsSecurityMediumType |
Remarks
All implementations derived from this base class implement key file security. Thus, this method always returns File.
State
Declaration
public EbicsSecurityMediumState State { get; }
Property Value
Type | Description |
---|---|
EbicsSecurityMediumState |
SupportedSecurityCodes
Provides the set of EBICS security operations that are supported by this security media implementation.
Declaration
public EbicsSecurityCode SupportedSecurityCodes { get; }
Property Value
Type | Description |
---|---|
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)
Declaration
public bool Authenticate(string sPIN)
Parameters
Type | Name | Description |
---|---|---|
System.String | sPIN |
Returns
Type | Description |
---|---|
System.Boolean |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | There is no file selected. |
ChangePIN(String, String)
Change the password used to protect the key file.
Declaration
public bool ChangePIN(string sOldPIN, string sNewPIN)
Parameters
Type | Name | Description |
---|---|---|
System.String | sOldPIN | The old password to be changed. Must not be |
System.String | sNewPIN | The new password to be assigned. Must not be |
Returns
Type | Description |
---|---|
System.Boolean | If the password was changed successfully, then |
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
Type | Condition |
---|---|
System.ArgumentNullException | The parameter sOldPIN or sNewPIN was |
System.InvalidOperationException | This security medium instance is not in the Selected state. |
Create(String, String)
Creates a new key file.
Declaration
public bool Create(string sSecurityMediaID, string sPIN)
Parameters
Type | Name | Description |
---|---|---|
System.String | sSecurityMediaID | The path to the key file to be created. This must not be |
System.String | sPIN | The PIN to be assigned to the new file to be created. |
Returns
Type | Description |
---|---|
System.Boolean | If the security token was successfully created, then |
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
Type | Condition |
---|---|
System.ArgumentNullException | The parameter sSecurityMediaID or sPIN was |
System.ArgumentException | The parameter sSecurityMediaID was an empty string. |
System.InvalidOperationException | There is already a selected file. |
GetPasswordInfo()
Declaration
public EbicsPasswordInfo GetPasswordInfo()
Returns
Type | Description |
---|---|
EbicsPasswordInfo |
GetSecurityOperations(EbicsContact)
Declaration
public IEbicsSecurityOperations GetSecurityOperations(EbicsContact aContact)
Parameters
Type | Name | Description |
---|---|---|
EbicsContact | aContact |
Returns
Type | Description |
---|---|
IEbicsSecurityOperations |
Release()
Declaration
public void Release()
Select(String)
Select existing key file.
Declaration
public bool Select(string sSecurityMediaID)
Parameters
Type | Name | Description |
---|---|---|
System.String | sSecurityMediaID | The path to the existing key file to select. This must not be |
Returns
Type | Description |
---|---|
System.Boolean |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The parameter sSecurityMediaID was |
System.ArgumentException | The parameter sSecurityMediaID was an empty string. |
System.InvalidOperationException | There is already a selected file. |
Explicit Interface Implementations
IEbicsSecurityMediumPrivKeys.DeletePrivKey(EbicsContact, EbicsSecurityCode)
Declaration
void IEbicsSecurityMediumPrivKeys.DeletePrivKey(EbicsContact aContact, EbicsSecurityCode nCode)
Parameters
Type | Name | Description |
---|---|---|
EbicsContact | aContact | Ignored by this implementation. |
EbicsSecurityCode | nCode |
IEbicsSecurityMediumPrivKeys.GetPrivKey(EbicsContact, EbicsSecurityCode)
Declaration
EbicsPrivKey IEbicsSecurityMediumPrivKeys.GetPrivKey(EbicsContact aContact, EbicsSecurityCode nCode)
Parameters
Type | Name | Description |
---|---|---|
EbicsContact | aContact | Ignored by this implementation. |
EbicsSecurityCode | nCode |
Returns
Type | Description |
---|---|
EbicsPrivKey |
IEbicsSecurityMediumPrivKeys.StorePrivKey(EbicsContact, EbicsPrivKey)
Declaration
void IEbicsSecurityMediumPrivKeys.StorePrivKey(EbicsContact aContact, EbicsPrivKey aPrivKey)
Parameters
Type | Name | Description |
---|---|---|
EbicsContact | aContact | Ignored by this implementation. |
EbicsPrivKey | aPrivKey |