Class HashElement
java.lang.Object
org.jivesoftware.smackx.hashes.element.HashElement
- All Implemented Interfaces:
org.jivesoftware.smack.packet.Element,org.jivesoftware.smack.packet.ExtensionElement,org.jivesoftware.smack.packet.NamedElement,org.jivesoftware.smack.packet.XmlElement,org.jivesoftware.smack.packet.XmlLangElement
Represent a hash element.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHashElement(HashManager.ALGORITHM algorithm, byte[] hash) Create a HashElement from pre-calculated values.HashElement(HashManager.ALGORITHM algorithm, String hashB64) Create a HashElement from pre-calculated values. -
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jivesoftware.smack.packet.Element
toXML, toXMLMethods inherited from interface org.jivesoftware.smack.packet.XmlElement
getLanguage, getQName
-
Field Details
-
ELEMENT
- See Also:
-
ATTR_ALGO
- See Also:
-
QNAME
-
-
Constructor Details
-
HashElement
Create a HashElement from pre-calculated values.- Parameters:
algorithm- The algorithm which was used.hash- the checksum as byte array.
-
HashElement
Create a HashElement from pre-calculated values.- Parameters:
algorithm- the algorithm that was used.hashB64- the checksum in base 64.
-
-
Method Details
-
getAlgorithm
Return the hash algorithm used in this HashElement.- Returns:
- algorithm the algorithm.
-
getHash
public byte[] getHash()Return the checksum as a byte array.- Returns:
- the hash.
-
getHashB64
Return the checksum as a base16 (hex) string.- Returns:
- the hash.
-
getElementName
- Specified by:
getElementNamein interfaceorg.jivesoftware.smack.packet.NamedElement
-
getNamespace
- Specified by:
getNamespacein interfaceorg.jivesoftware.smack.packet.XmlElement
-
toXML
- Specified by:
toXMLin interfaceorg.jivesoftware.smack.packet.Element
-
equals
-
hashCode
public int hashCode()
-