Class 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
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected byte[] data  
      protected KeyType type  
    • Constructor Summary

      Constructors 
      Constructor Description
      KeySig​(KeyType keyType, byte[] data)  
    • Field Detail

      • 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 signature
        clazz - 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 class java.lang.Object