Interface SecpPrivKey
- All Superinterfaces:
AsymmetricKey, DEREncodablePREVIEW, Destroyable, ECKey, ECPrivateKey, Key, PrivateKey, Serializable
- All Known Subinterfaces:
SecpKeyPair
- All Known Implementing Classes:
SecpKeyPairImpl, SecpPrivKeyImpl
A P256k1 private key.
-
Field Summary
Fields inherited from interface ECPrivateKey
serialVersionUID -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Destroy must be implemented and must not throw (checked) exceptionsdefault Stringbyte[]default Stringdefault ECParameterSpecdefault BigIntegergetS()static SecpPrivKeyof(byte[] bytes) Construct a private key from bytesstatic SecpPrivKeyof(BigInteger p) Construct a private key from an integerMethods inherited from interface Destroyable
isDestroyed
-
Method Details
-
getAlgorithm
- Specified by:
getAlgorithmin interfaceKey
-
getFormat
-
getEncoded
byte[] getEncoded()- Specified by:
getEncodedin interfaceKey- Returns:
- 32-bytes, Big endian with no prefix or suffix
-
getS
- Specified by:
getSin interfaceECPrivateKey
-
getParams
- Specified by:
getParamsin interfaceAsymmetricKey- Specified by:
getParamsin interfaceECKey- Specified by:
getParamsin interfaceECPrivateKey
-
of
Construct a private key from an integer- Parameters:
p- Must be a member of the Secp256k1 field- Returns:
- private key
-
of
Construct a private key from bytes- Parameters:
bytes- bytes- Returns:
- private key
-
destroy
void destroy()Destroy must be implemented and must not throw (checked) exceptions- Specified by:
destroyin interfaceDestroyable
-