Package org.symbol.sdk
Class CryptoTypes.PrivateKey
java.lang.Object
org.symbol.sdk.ByteArray
org.symbol.sdk.CryptoTypes.PrivateKey
- All Implemented Interfaces:
Serializer
- Enclosing class:
CryptoTypes
- PrivateKey
- Represents a private key.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPrivateKey(byte[] bytes) Creates a private key from raw bytes.PrivateKey(String hex) Creates a private key from a hex string. -
Method Summary
Modifier and TypeMethodDescriptionstatic CryptoTypes.PrivateKeyrandom()Creates a random private key.
-
Field Details
-
SIZE
public static final int SIZEByte size of raw private key.- See Also:
-
-
Constructor Details
-
PrivateKey
public PrivateKey(byte[] bytes) Creates a private key from raw bytes.- Parameters:
bytes- Input byte array.
-
PrivateKey
Creates a private key from a hex string.- Parameters:
hex- Input string.
-
-
Method Details
-
random
- PrivateKey.random
- Creates a random private key.
- Returns:
- Random private key.
-