public class CryptoAttribute extends Object
Modifier and Type | Field and Description |
---|---|
protected CryptoSuite |
cryptoSuite |
protected KeyParam[] |
keyParams |
protected SessionParam[] |
sessionParams |
protected int |
tag |
Modifier | Constructor and Description |
---|---|
protected |
CryptoAttribute() |
|
CryptoAttribute(int tag,
CryptoSuite cryptoSuite,
KeyParam[] keyParams,
SessionParam[] sessionParams)
Creates a crypto attribute from already instantiated objects.
|
Modifier and Type | Method and Description |
---|---|
static CryptoAttribute |
create(String attribute,
SDesFactory f)
Creates an instance of a CryptoAttribute from an SDes string in the
format of
tag 1*WSP crypto-suite 1*WSP key-params *(1*WSP session-param)
|
static CryptoAttribute |
create(String tag,
String cryptoSuite,
String keyParams,
String sessionParams,
SDesFactory f)
Creates an instance of a CryptoAttribute from a SDes attributes (tag,
crypto suite, key params and session params).
|
String |
encode()
Encodes this crypto attribute as a string according to the ABNF rule
tag 1*WSP crypto-suite 1*WSP key-params *(1*WSP session-param)
|
boolean |
equals(Object obj) |
CryptoSuite |
getCryptoSuite()
Gets the identifier that describes the encryption and authentication
algorithms (e.g., AES_CM_128_HMAC_SHA1_80) for the transport in question.
|
KeyParam[] |
getKeyParams()
Gets one or more sets of keying material for the crypto-suite in
question.
|
String |
getKeyParamsString()
Returns a string representation the key parameters according to the ABNF
rule key-params.
|
SessionParam[] |
getSessionParams()
Gets the additional key parameters for this particular crypto attribute.
|
String |
getSessionParamsString()
Returns a string representation of the session parameters according to
the ABNF rule session-param.
|
int |
getTag()
Gets the identifier for this particular crypto attribute.
|
int |
hashCode() |
protected int tag
protected CryptoSuite cryptoSuite
protected KeyParam[] keyParams
protected SessionParam[] sessionParams
protected CryptoAttribute()
public CryptoAttribute(int tag, CryptoSuite cryptoSuite, KeyParam[] keyParams, SessionParam[] sessionParams)
tag
- identifier for this particular crypto attributecryptoSuite
- identifier that describes the encryption and
authentication algorithmskeyParams
- one or more sets of keying materialsessionParams
- the additional key parameterspublic static CryptoAttribute create(String attribute, SDesFactory f)
attribute
- the encoded SDes attributef
- factory that creates the instances for each part of the
attributepublic static CryptoAttribute create(String tag, String cryptoSuite, String keyParams, String sessionParams, SDesFactory f)
tag
- unparsed tag as a string.cryptoSuite
- the crypto suite as an unparsed string.keyParams
- An unparsed string representation of the key param list
(each key must be separated by a ";").sessionParams
- An unparsed string representation of the session
param list (each key must be separated by a " ").f
- factory that creates the instances for each part of the
attributepublic int getTag()
public CryptoSuite getCryptoSuite()
public KeyParam[] getKeyParams()
public SessionParam[] getSessionParams()
public String encode()
public String getKeyParamsString()
public String getSessionParamsString()
Copyright © 2018 University of Applied Sciences Northwestern Switzerland. All rights reserved.