de.flexiprovider.ec.keys
Class ECSecretKey
java.lang.Object
|
+--de.flexiprovider.ec.keys.ECSecretKey
- All Implemented Interfaces:
- java.security.Key, Key, SecretKey, javax.crypto.SecretKey, java.io.Serializable
- public class ECSecretKey
- extends java.lang.Object
- implements SecretKey
This class implements an EC secret key.
- Author:
- Jochen Hechler, Marcus Stögbauer
- See Also:
- Serialized Form
| Fields inherited from interface java.security.Key |
serialVersionUID |
| Methods inherited from class java.lang.Object |
, clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
ECSecretKey
public ECSecretKey(FlexiBigInt s)
- Construct a new EC secret key.
- Parameters:
s - the FlexiBigInt that represents the private key
getAlgorithm
public java.lang.String getAlgorithm()
- Return the name of the algorithm this key is used with.
- Specified by:
getAlgorithm in interface java.security.Key
- Returns:
- "EC"
getEncoded
public byte[] getEncoded()
- Specified by:
getEncoded in interface java.security.Key
- Returns:
- the key material of this secret key
getFormat
public java.lang.String getFormat()
- Returns the name of the encoding format for this secret key.
- Specified by:
getFormat in interface java.security.Key
- Returns:
- "RAW"
getS
public FlexiBigInt getS()
- Returns:
- the private key s
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object