Class HashElement
java.lang.Object
org.jivesoftware.smackx.hashes.element.HashElement
- All Implemented Interfaces:
Element,ExtensionElement,NamedElement,XmlElement,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
Modifier and TypeMethodDescriptionbooleanReturn the hash algorithm used in this HashElement.Returns the root element name.byte[]getHash()Return the checksum as a byte array.Return the checksum as a base16 (hex) string.Returns the root element XML namespace.inthashCode()toXML(XmlEnvironment enclosingNamespace) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods 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
Return the checksum as a byte array.- Returns:
- the hash.
-
getHashB64
Return the checksum as a base16 (hex) string.- Returns:
- the hash.
-
getElementName
Description copied from interface:NamedElementReturns the root element name.- Specified by:
getElementNamein interfaceNamedElement- Returns:
- the element name.
-
getNamespace
Description copied from interface:XmlElementReturns the root element XML namespace.- Specified by:
getNamespacein interfaceXmlElement- Returns:
- the namespace.
-
toXML
-
equals
-
hashCode
-