Class EDDSAPrivateKey
java.lang.Object
io.jans.as.model.crypto.PrivateKey
io.jans.as.model.crypto.signature.EDDSAPrivateKey
- All Implemented Interfaces:
JSONable
Edwards Curve Digital Signature Algorithm (EDDSA)
Private Key
- Version:
- July 23, 2021
- Author:
- Sergey Manoylo
-
Constructor Summary
ConstructorsConstructorDescriptionEDDSAPrivateKey(EDDSAPrivateKey eddsaPrivateKey) Copy ConstructorEDDSAPrivateKey(SignatureAlgorithm signatureAlgorithm, byte[] dEncoded, 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 private keyReturns public key value array (PKCS8 encoded, Private-Key Information Syntax Standard) in PKCS8EncodedKeySpec object; PKCS8EncodedKeySpec allows to get encoded array (byte[] getEncoded());byte[]Returns original array (decoded) of the public key (ED25519 - 32 byte, ED448 - 56 bytes);byte[]Returns encoded public keyReturns public key value array (X509 encoded) in X509EncodedKeySpec object; X509EncodedKeySpec allows to get encoded array (byte[]);org.json.JSONObjectConverts EDDSA private key to JSON ObjecttoString()Converts EDDSA private key to String ObjectMethods inherited from class io.jans.as.model.crypto.PrivateKey
getKeyId, getSignatureAlgorithm, setKeyId, setSignatureAlgorithm
-
Constructor Details
-
EDDSAPrivateKey
Constructor- Parameters:
signatureAlgorithm-dEncoded-xEncoded-
-
EDDSAPrivateKey
Copy Constructor- Parameters:
eddsaPrivateKey-
-
-
Method Details
-
getPrivateKeySpec
Returns public key value array (PKCS8 encoded, Private-Key Information Syntax Standard) in PKCS8EncodedKeySpec object; PKCS8EncodedKeySpec allows to get encoded array (byte[] getEncoded());- Returns:
- public key value array (PKCS8 encoded, Private-Key Information Syntax Standard) in PKCS8EncodedKeySpec object; PKCS8EncodedKeySpec allows to get encoded array (byte[] getEncoded());
-
getPublicKeySpec
Returns public key value array (X509 encoded) in X509EncodedKeySpec object; X509EncodedKeySpec allows to get encoded array (byte[]);- Returns:
- public key value array (X509 encoded) in X509EncodedKeySpec object; X509EncodedKeySpec allows to get encoded array (byte[]);
-
getPrivateKeyDecoded
Returns original array (decoded) of the public key (ED25519 - 32 byte, ED448 - 56 bytes);- Returns:
- original array (decoded) of the public key (ED25519 - 32 byte, ED448 - 56 bytes);
- Throws:
IOException
-
getPrivateKeyEncoded
public byte[] getPrivateKeyEncoded()Returns encoded private key- Returns:
-
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 (ED25519 - 32 byte, ED448 - 56 bytes);
-
getPublicKeyEncoded
public byte[] getPublicKeyEncoded()Returns encoded public key- Returns:
-
toJSONObject
public org.json.JSONObject toJSONObject() throws org.json.JSONExceptionConverts EDDSA private key to JSON Object- Throws:
org.json.JSONException
-
toString
Converts EDDSA private key to String Object
-