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
-
Constructor Summary
ConstructorDescriptionHashElement
(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 TypeMethodDescriptionboolean
Return 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.int
hashCode()
toXML
(XmlEnvironment enclosingNamespace) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods 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:NamedElement
Returns the root element name.- Specified by:
getElementName
in interfaceNamedElement
- Returns:
- the element name.
-
getNamespace
Description copied from interface:XmlElement
Returns the root element XML namespace.- Specified by:
getNamespace
in interfaceXmlElement
- Returns:
- the namespace.
-
toXML
-
equals
-
hashCode
-