Package net.i2p.router.transport.crypto
Class X25519PublicKey
- java.lang.Object
-
- net.i2p.router.transport.crypto.X25519PublicKey
-
- All Implemented Interfaces:
Serializable
,Key
,PublicKey
public class X25519PublicKey extends Object implements PublicKey
A PublicKey we can stick in a KeyPair. Raw data is accessible via getEncoded().- Since:
- 0.9.36
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface java.security.PublicKey
serialVersionUID
-
-
Constructor Summary
Constructors Constructor Description X25519PublicKey(byte[] data)
Montgomery representation, little-endian
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAlgorithm()
byte[]
getEncoded()
The raw byte array, there is no encoding.String
getFormat()
-
-
-
Constructor Detail
-
X25519PublicKey
public X25519PublicKey(byte[] data)
Montgomery representation, little-endian- Parameters:
data
- 32 bytes- Throws:
IllegalArgumentException
- if not 32 bytes
-
-
Method Detail
-
getEncoded
public byte[] getEncoded()
The raw byte array, there is no encoding.- Specified by:
getEncoded
in interfaceKey
- Returns:
- the data passed in
-
getAlgorithm
public String getAlgorithm()
- Specified by:
getAlgorithm
in interfaceKey
-
-