Class SecpPrivKeyImpl
java.lang.Object
org.bitcoinj.secp.internal.SecpPrivKeyImpl
- All Implemented Interfaces:
Serializable, AsymmetricKey, DEREncodablePREVIEW, ECKey, ECPrivateKey, Key, PrivateKey, Destroyable, SecpPrivKey
Default/internal implementation of
SecpPrivKey- See Also:
-
Field Summary
Fields inherited from interface ECPrivateKey
serialVersionUID -
Constructor Summary
ConstructorsConstructorDescriptionSecpPrivKeyImpl(byte[] bytes) Caller is responsible for defensively copyingbyte[].SecpPrivKeyImpl(BigInteger privKey) -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface SecpPrivKey
getAlgorithm, getFormat, getParams
-
Constructor Details
-
SecpPrivKeyImpl
public SecpPrivKeyImpl(byte[] bytes) Caller is responsible for defensively copyingbyte[]. This is to avoid a redundant copy. Exclusive ownership must be passed to this instance.- Parameters:
bytes- (will not be defensively copied)
-
SecpPrivKeyImpl
-
-
Method Details
-
getEncoded
public byte[] getEncoded()- Specified by:
getEncodedin interfaceKey- Specified by:
getEncodedin interfaceSecpPrivKey- Returns:
- 32-bytes, Big endian with no prefix or suffix
-
getS
- Specified by:
getSin interfaceECPrivateKey- Specified by:
getSin interfaceSecpPrivKey
-
destroy
public void destroy()Description copied from interface:SecpPrivKeyDestroy must be implemented and must not throw (checked) exceptions- Specified by:
destroyin interfaceDestroyable- Specified by:
destroyin interfaceSecpPrivKey
-
isDestroyed
public boolean isDestroyed()- Specified by:
isDestroyedin interfaceDestroyable
-