Package com.syntifi.near.api.model.key
Class KeySig
- java.lang.Object
-
- com.syntifi.near.api.model.key.KeySig
-
- Direct Known Subclasses:
PrivateKey
,PublicKey
,Signature
public class KeySig extends java.lang.Object
KeySig holds information about a key or signature. Also, it handles to disassemble and assemble of key and signature structure.- Since:
- 0.0.1
- Author:
- Alexandre Carvalho, Andre Bertolace
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T extends KeySig>
TfromEncodedBase58String(java.lang.String encodedBase58String, java.lang.Class<T> clazz)
Reads from key or signature from base-58 stringjava.lang.String
toEncodedBase58String()
java.lang.String
toString()
-
-
-
Field Detail
-
type
protected KeyType type
-
data
protected byte[] data
-
-
Constructor Detail
-
KeySig
public KeySig(KeyType keyType, byte[] data)
-
-
Method Detail
-
fromEncodedBase58String
public static <T extends KeySig> T fromEncodedBase58String(java.lang.String encodedBase58String, java.lang.Class<T> clazz)
Reads from key or signature from base-58 string- Type Parameters:
T
- the parameter return class- Parameters:
encodedBase58String
- a string base-58 encoded with the key or signatureclazz
- return class type- Returns:
- a PublicKey, PrivateKey or Signature object with type and data
-
toEncodedBase58String
public java.lang.String toEncodedBase58String()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-