Class EbicsSecurity
public sealed class EbicsSecurity
- Inheritance
-
EbicsSecurity
- Inherited Members
Constructors
EbicsSecurity(EbicsSecurityCode)
public EbicsSecurity(EbicsSecurityCode nCode)
Parameters
nCode
EbicsSecurityCodeOne of the defined security operation codes.
Exceptions
- ArgumentException
The parameter nCode was none of the well known security operation codes defined by the EbicsSecurityCode enumeration.
EbicsSecurity(string)
public EbicsSecurity(string sCode)
Parameters
sCode
stringThe security operation code, such as "A005" or "X001". This must not be
null
and must be a well known EBICS security operation code.
Exceptions
- ArgumentNullException
The parameter sCode was
null
.- ArgumentException
The parameter sCode was none of the well known EBICS security operation codes.
Properties
A004
EBICS A004 electronic signature.
public static EbicsSecurity A004 { get; }
Property Value
A005
EBICS A005 electronic signature.
public static EbicsSecurity A005 { get; }
Property Value
A006
EBICS A006 electronic signature.
public static EbicsSecurity A006 { get; }
Property Value
Code
public EbicsSecurityCode Code { get; }
Property Value
DefaultKeyLength
Default RSA key length in bytes.
public int DefaultKeyLength { get; }
Property Value
E001
EBICS E001 encryption.
public static EbicsSecurity E001 { get; }
Property Value
E002
EBICS E002 encryption.
public static EbicsSecurity E002 { get; }
Property Value
MaxKeyLength
Maximum RSA key length in bytes.
public int MaxKeyLength { get; }
Property Value
MinKeyLength
Minimum RSA key length in bytes.
public int MinKeyLength { get; }
Property Value
X001
EBICS X001 authentication signature.
public static EbicsSecurity X001 { get; }
Property Value
X002
EBICS X002 authentication signature.
public static EbicsSecurity X002 { get; }
Property Value
Methods
CodeFromString(string)
Static helper that converts a string representation of a security operation code to an ordinal EbicsSecurityCode value.
public static EbicsSecurityCode CodeFromString(string sCode)
Parameters
sCode
stringThe security operation code, such as "A005" or "X001". This must not be
null
and must be a well known EBICS security operation code.
Returns
- EbicsSecurityCode
The ordinal EbicsSecurityCode value for the given string identifier.
Exceptions
- ArgumentNullException
The parameter sCode was
null
.- ArgumentException
The parameter sCode was none of the well known EBICS security operation codes.
CodeToString(EbicsSecurityCode)
Static helper that converts an EbicsSecurityCode to its string representation.
public static string CodeToString(EbicsSecurityCode nCode)
Parameters
nCode
EbicsSecurityCodeOne of the defined security operation codes.
Returns
- string
A string identifier as used in EBICS XML elements such as "A005" or "X002".
Exceptions
- ArgumentException
The parameter nCode was none of the well known security operation codes defined by the EbicsSecurityCode enumeration.
Equals(object)
public override bool Equals(object aObject)
Parameters
aObject
object
Returns
GetDigestAlgorithm()
public CryDigestAlgorithm GetDigestAlgorithm()
Returns
- CryDigestAlgorithm
GetDigestAlgorithmUri()
public string GetDigestAlgorithmUri()
Returns
GetHashCode()
public override int GetHashCode()
Returns
GetKeyExchange(CryRSA)
public CryKeyExchange GetKeyExchange(CryRSA aRSA)
Parameters
aRSA
CryRSA
Returns
- CryKeyExchange
GetSecurity(EbicsSecurityCode)
Returns the global EbicsSecurity instance for a given security code.
public static EbicsSecurity GetSecurity(EbicsSecurityCode nCode)
Parameters
nCode
EbicsSecurityCodeThe security code to return the EbicsSecurity for. This must not be None or a mask, but a single security code value.
Returns
- EbicsSecurity
Returns one of A004, A005, A006, E001, E002, X001, or X002, depending on the given parameter value.
Exceptions
- ArgumentException
The given security code did not identify a well known EbicsSecurity.
GetSignatureAlgorithmUri()
public string GetSignatureAlgorithmUri()
Returns
GetSignatureScheme(CryRSA)
public CrySignature GetSignatureScheme(CryRSA aRSA)
Parameters
aRSA
CryRSA
Returns
- CrySignature
ToString()
Converts this security operation to its string identifier,
public override string ToString()
Returns
- string
A string identifier as used in EBICS XML elements such as "A005" or "X002".
ValidateCode(EbicsSecurityCode)
public static bool ValidateCode(EbicsSecurityCode nCode)
Parameters
nCode
EbicsSecurityCode
Returns
ValidateSecurity(EbicsVersion, EbicsSecurityCode)
Validates a set of security codes against an EBICS version.
public static bool ValidateSecurity(EbicsVersion nVersion, EbicsSecurityCode nCodes)
Parameters
nVersion
EbicsVersionnCodes
EbicsSecurityCodeA bit set of user key versions, including one bit for authentication key, one bit for encryption key, and one bit for signature key.
Returns
- bool
Returns true if, and only if, the given EBICS version is supported and the given set of security version codes is allowed for that EBICS version.