Class SubscriptionBodyImpl


  • public class SubscriptionBodyImpl
    extends java.lang.Object
    • Field Detail

      • name

        private java.lang.String name
      • is_public

        private boolean is_public
      • is_anonymous

        private java.lang.Boolean is_anonymous
      • public_key

        private byte[] public_key
      • version

        private int version
      • az_version

        private int az_version
      • json

        private java.lang.String json
      • singleton_details

        private java.util.Map singleton_details
      • hash

        private byte[] hash
      • sig

        private byte[] sig
      • sig_data_size

        private int sig_data_size
      • map

        private java.util.Map map
    • Constructor Detail

      • SubscriptionBodyImpl

        protected SubscriptionBodyImpl​(SubscriptionManagerImpl _manager,
                                       java.util.Map _map)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • SubscriptionBodyImpl

        protected SubscriptionBodyImpl​(SubscriptionManagerImpl _manager,
                                       java.lang.String _name,
                                       boolean _is_public,
                                       boolean _is_anonymous,
                                       java.lang.String _json_content,
                                       byte[] _public_key,
                                       int _version,
                                       int _az_version,
                                       java.util.Map _singleton_details)
                                throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • encode

        protected static byte[] encode​(byte[] hash,
                                       int version,
                                       int size)
      • sign

        protected static byte[] sign​(byte[] private_key,
                                     byte[] hash,
                                     int version,
                                     int size)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • verify

        protected static boolean verify​(byte[] public_key,
                                        byte[] hash,
                                        int version,
                                        int size,
                                        byte[] sig)
      • deriveShortID

        protected static byte[] deriveShortID​(byte[] public_key,
                                              java.util.Map singleton_details)
      • deriveSingletonShortID

        protected static byte[] deriveSingletonShortID​(java.util.Map singleton_details)
      • load

        protected void load​(java.util.Map _map,
                            boolean _verify)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • updateDetails

        protected void updateDetails​(SubscriptionImpl subs,
                                     java.util.Map details)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • getName

        protected java.lang.String getName()
      • getPublicKey

        protected byte[] getPublicKey()
      • getShortID

        public byte[] getShortID()
      • isPublic

        protected boolean isPublic()
      • isAnonymous

        protected boolean isAnonymous()
      • getJSON

        protected java.lang.String getJSON()
      • getSingletonDetails

        protected java.util.Map getSingletonDetails()
      • setJSON

        protected void setJSON​(java.lang.String _json)
      • getVersion

        protected int getVersion()
      • getAZVersion

        protected int getAZVersion()
      • getHash

        protected byte[] getHash()
      • getSig

        protected byte[] getSig()
      • getSigDataSize

        protected int getSigDataSize()