Class EDDSAPublicKey
- java.lang.Object
-
- io.jans.as.model.crypto.PublicKey
-
- io.jans.as.model.crypto.signature.EDDSAPublicKey
-
-
Constructor Summary
Constructors Constructor Description EDDSAPublicKey(EDDSAPublicKey eddsaPublicKey)
Copy ConstructorEDDSAPublicKey(SignatureAlgorithm signatureAlgorithm, byte[] xEncoded)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getPublicKeyDecoded()
Returns original array (decoded) of the public key (ED25519 - 32 byte, ED448 - 56 bytes)byte[]
getPublicKeyEncoded()
Returns encoded public keyX509EncodedKeySpec
getPublicKeySpec()
get public key value array (X509 encoded) in X509EncodedKeySpec object; X509EncodedKeySpec allows to get encoded array (byte[] getEncoded())org.json.JSONObject
toJSONObject()
Converts EDDSA public key to JSON ObjectString
toString()
Converts EDDSA public key to String Object-
Methods inherited from class io.jans.as.model.crypto.PublicKey
getCertificate, getKeyId, getSignatureAlgorithm, setCertificate, setKeyId, setSignatureAlgorithm
-
-
-
-
Constructor Detail
-
EDDSAPublicKey
public EDDSAPublicKey(SignatureAlgorithm signatureAlgorithm, byte[] xEncoded)
Constructor- Parameters:
signatureAlgorithm
-publicKeyData
-
-
EDDSAPublicKey
public EDDSAPublicKey(EDDSAPublicKey eddsaPublicKey)
Copy Constructor- Parameters:
eddsaPublicKey
-
-
-
Method Detail
-
getPublicKeySpec
public X509EncodedKeySpec getPublicKeySpec()
get public key value array (X509 encoded) in X509EncodedKeySpec object; X509EncodedKeySpec allows to get encoded array (byte[] getEncoded())- Returns:
- public key value array (X509 encoded) in X509EncodedKeySpec object; X509EncodedKeySpec allows to get encoded array (byte[] getEncoded());
-
getPublicKeyDecoded
public byte[] getPublicKeyDecoded()
Returns original array (decoded) of the public key (ED25519 - 32 byte, ED448 - 56 bytes)- Returns:
- original array (decoded) of the public key;
-
getPublicKeyEncoded
public byte[] getPublicKeyEncoded()
Returns encoded public key- Returns:
-
toJSONObject
public org.json.JSONObject toJSONObject() throws org.json.JSONException
Converts EDDSA public key to JSON Object- Throws:
org.json.JSONException
-
-