Class SubscriptionBodyImpl
java.lang.Object
com.biglybt.core.subs.impl.SubscriptionBodyImpl
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSubscriptionBodyImpl(SubscriptionManagerImpl _manager, SubscriptionImpl _subs) protectedSubscriptionBodyImpl(SubscriptionManagerImpl _manager, String _name, boolean _is_public, boolean _is_anonymous, String _json_content, byte[] _public_key, int _version, int _az_version, Map _singleton_details) protectedSubscriptionBodyImpl(SubscriptionManagerImpl _manager, Map _map) -
Method Summary
Modifier and TypeMethodDescriptionprotected static byte[]deriveShortID(byte[] public_key, Map singleton_details) protected static byte[]deriveSingletonShortID(Map singleton_details) protected static byte[]encode(byte[] hash, int version, int size) protected intprotected byte[]getHash()protected StringgetJSON()protected StringgetName()protected byte[]byte[]protected byte[]getSig()protected intprotected Mapprotected intprotected booleanprotected booleanisPublic()protected voidprotected voidprotected voidprotected static byte[]sign(byte[] private_key, byte[] hash, int version, int size) protected voidupdateDetails(SubscriptionImpl subs, Map details) protected static booleanverify(byte[] public_key, byte[] hash, int version, int size, byte[] sig) protected void
-
Field Details
-
SIMPLE_ID_LENGTH
private static final int SIMPLE_ID_LENGTH- See Also:
-
manager
-
name
-
is_public
private boolean is_public -
is_anonymous
-
public_key
private byte[] public_key -
version
private int version -
az_version
private int az_version -
json
-
singleton_details
-
hash
private byte[] hash -
sig
private byte[] sig -
sig_data_size
private int sig_data_size -
map
-
-
Constructor Details
-
SubscriptionBodyImpl
protected SubscriptionBodyImpl(SubscriptionManagerImpl _manager, SubscriptionImpl _subs) throws SubscriptionException - Throws:
SubscriptionException
-
SubscriptionBodyImpl
- Throws:
IOException
-
SubscriptionBodyImpl
protected SubscriptionBodyImpl(SubscriptionManagerImpl _manager, String _name, boolean _is_public, boolean _is_anonymous, String _json_content, byte[] _public_key, int _version, int _az_version, Map _singleton_details) throws IOException - Throws:
IOException
-
-
Method Details
-
encode
protected static byte[] encode(byte[] hash, int version, int size) -
sign
-
verify
protected static boolean verify(byte[] public_key, byte[] hash, int version, int size, byte[] sig) -
deriveShortID
-
deriveSingletonShortID
-
load
- Throws:
IOException
-
updateDetails
- Throws:
IOException
-
getName
-
getPublicKey
protected byte[] getPublicKey() -
getShortID
public byte[] getShortID() -
isPublic
protected boolean isPublic() -
isAnonymous
protected boolean isAnonymous() -
getJSON
-
getSingletonDetails
-
setJSON
-
getVersion
protected int getVersion() -
getAZVersion
protected int getAZVersion() -
getHash
protected byte[] getHash() -
getSig
protected byte[] getSig() -
getSigDataSize
protected int getSigDataSize() -
writeVuzeFile
- Throws:
SubscriptionException
-
rethrow
- Throws:
SubscriptionException
-