Class EDDSAPublicKey
java.lang.Object
io.jans.as.model.crypto.PublicKey
io.jans.as.model.crypto.signature.EDDSAPublicKey
- All Implemented Interfaces:
JSONable
Edwards Curve Digital Signature Algorithm (EDDSA)
Public Key
- Version:
- July 23, 2021
- Author:
- Sergey Manoylo
-
Constructor Summary
ConstructorsConstructorDescriptionEDDSAPublicKey(EDDSAPublicKey eddsaPublicKey) Copy ConstructorEDDSAPublicKey(SignatureAlgorithm signatureAlgorithm, byte[] xEncoded) Constructor -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Returns original array (decoded) of the public key (ED25519 - 32 byte, ED448 - 56 bytes)byte[]Returns encoded public keyget public key value array (X509 encoded) in X509EncodedKeySpec object; X509EncodedKeySpec allows to get encoded array (byte[] getEncoded())org.json.JSONObjectConverts EDDSA public key to JSON ObjecttoString()Converts EDDSA public key to String ObjectMethods inherited from class io.jans.as.model.crypto.PublicKey
getCertificate, getKeyId, getSignatureAlgorithm, setCertificate, setKeyId, setSignatureAlgorithm
-
Constructor Details
-
EDDSAPublicKey
Constructor- Parameters:
signatureAlgorithm-xEncoded-
-
EDDSAPublicKey
Copy Constructor- Parameters:
eddsaPublicKey-
-
-
Method Details
-
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.JSONExceptionConverts EDDSA public key to JSON Object- Throws:
org.json.JSONException
-
toString
Converts EDDSA public key to String Object
-