Package com.biglybt.core.subs.impl
Class SubscriptionBodyImpl
java.lang.Object
com.biglybt.core.subs.impl.SubscriptionBodyImpl
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
SubscriptionBodyImpl
(SubscriptionManagerImpl _manager, SubscriptionImpl _subs) 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) protected
SubscriptionBodyImpl
(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 int
protected byte[]
getHash()
protected String
getJSON()
protected String
getName()
protected byte[]
byte[]
protected byte[]
getSig()
protected int
protected Map
protected int
protected boolean
protected boolean
isPublic()
protected void
protected void
protected void
protected static byte[]
sign
(byte[] private_key, byte[] hash, int version, int size) protected void
updateDetails
(SubscriptionImpl subs, Map details) protected static boolean
verify
(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
protected static byte[] sign(byte[] private_key, byte[] hash, int version, int size) throws Exception - Throws:
Exception
-
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
-