Package net.i2p.crypto.eddsa.spec
Class EdDSAPrivateKeySpec
java.lang.Object
net.i2p.crypto.eddsa.spec.EdDSAPrivateKeySpec
- All Implemented Interfaces:
KeySpec
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final byte[]
private final GroupElement
private final byte[]
private final byte[]
private final EdDSAParameterSpec
-
Constructor Summary
ConstructorsConstructorDescriptionEdDSAPrivateKeySpec
(byte[] seed, byte[] h, byte[] a, GroupElement A, EdDSAParameterSpec spec) EdDSAPrivateKeySpec
(byte[] seed, EdDSAParameterSpec spec) EdDSAPrivateKeySpec
(EdDSAParameterSpec spec, byte[] h) Initialize directly from the hash. -
Method Summary
-
Field Details
-
seed
private final byte[] seed -
h
private final byte[] h -
a
private final byte[] a -
A
-
spec
-
-
Constructor Details
-
EdDSAPrivateKeySpec
- Parameters:
seed
- the private keyspec
- the parameter specification for this key- Throws:
IllegalArgumentException
- if seed length is wrong or hash algorithm is unsupported
-
EdDSAPrivateKeySpec
Initialize directly from the hash. getSeed() will return null if this constructor is used.- Parameters:
spec
- the parameter specification for this keyh
- the private key- Throws:
IllegalArgumentException
- if hash length is wrong- Since:
- 0.1.1
-
EdDSAPrivateKeySpec
public EdDSAPrivateKeySpec(byte[] seed, byte[] h, byte[] a, GroupElement A, EdDSAParameterSpec spec)
-
-
Method Details
-
getSeed
public byte[] getSeed()- Returns:
- will be null if constructed directly from the private key
-
getH
public byte[] getH()- Returns:
- the hash
-
geta
public byte[] geta()- Returns:
- the private key
-
getA
- Returns:
- the public key
-
getParams
-