java.lang.Object
com.hedera.hashgraph.sdk.Key
- Direct Known Subclasses:
ContractId,EvmAddress,KeyList,PrivateKey,PublicKey
A common base for the signing authority or key that entities in Hedera may have.
See Hedera Documentation
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final org.bouncycastle.asn1.x9.X9ECParameters(package private) static final org.bouncycastle.crypto.params.ECDomainParameters(package private) static final org.bouncycastle.asn1.ASN1ObjectIdentifier(package private) static final org.bouncycastle.asn1.ASN1ObjectIdentifier(package private) static final org.bouncycastle.asn1.ASN1ObjectIdentifier -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic KeyfromBytes(byte[] bytes) Create Key from proto.Key byte array(package private) static KeyfromProtobufKey(Key key) Create a specific key type from the protobuf.byte[]toBytes()Create the byte array.(package private) abstract KeySerialize this key as a protobuf object
-
Field Details
-
ID_ED25519
static final org.bouncycastle.asn1.ASN1ObjectIdentifier ID_ED25519 -
ID_ECDSA_SECP256K1
static final org.bouncycastle.asn1.ASN1ObjectIdentifier ID_ECDSA_SECP256K1 -
ID_EC_PUBLIC_KEY
static final org.bouncycastle.asn1.ASN1ObjectIdentifier ID_EC_PUBLIC_KEY -
ECDSA_SECP256K1_CURVE
static final org.bouncycastle.asn1.x9.X9ECParameters ECDSA_SECP256K1_CURVE -
ECDSA_SECP256K1_DOMAIN
static final org.bouncycastle.crypto.params.ECDomainParameters ECDSA_SECP256K1_DOMAIN
-
-
Constructor Details
-
Key
public Key()
-
-
Method Details
-
fromProtobufKey
Create a specific key type from the protobuf.- Parameters:
key- the protobuf key of unknown type- Returns:
- the differentiated key
-
toProtobufKey
Serialize this key as a protobuf object -
toBytes
public byte[] toBytes()Create the byte array.- Returns:
- the byte array representation
-
fromBytes
Create Key from proto.Key byte array- Parameters:
bytes-- Returns:
- Key representation
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-