QXmpp
Version:1.3.1
|
Public Member Functions | |
QXmppBitsOfBinaryContentId () | |
Default contructor. | |
QXmppBitsOfBinaryContentId (const QXmppBitsOfBinaryContentId &cid) | |
QXmppBitsOfBinaryContentId & | operator= (const QXmppBitsOfBinaryContentId &other) |
QString | toContentId () const |
Returns a XEP-0231: Bits of Binary content id. | |
QString | toCidUrl () const |
Returns a XEP-0231: Bits of Binary cid: URL. | |
QByteArray | hash () const |
Returns the hash value in binary form. | |
void | setHash (const QByteArray &hash) |
Sets the hash value in binary form. | |
QCryptographicHash::Algorithm | algorithm () const |
void | setAlgorithm (QCryptographicHash::Algorithm algo) |
bool | isValid () const |
bool | operator== (const QXmppBitsOfBinaryContentId &other) const |
Returns true, if two QXmppBitsOfBinaryContentId equal. | |
Static Public Member Functions | |
static QXmppBitsOfBinaryContentId | fromCidUrl (const QString &input) |
static QXmppBitsOfBinaryContentId | fromContentId (const QString &input) |
static bool | isBitsOfBinaryContentId (const QString &uri, bool checkIsCidUrl=false) |
link to or an identifier of XEP-0231: Bits of Binary data.
QCryptographicHash::Algorithm QXmppBitsOfBinaryContentId::algorithm | ( | ) | const |
Returns the hash algorithm used to calculate the hash
value
The default value is QCryptographicHash::Sha1
.
This currently supports MD4, MD5, SHA-1, SHA-2 (SHA224 - SHA512) and SHA-3 (SHA3-224 - SHA3-512).
|
static |
Parses a QXmppBitsOfBinaryContentId
from a XEP-0231: Bits of Binary cid:
URL
In case parsing failed, the returned QXmppBitsOfBinaryContentId
is empty.
|
static |
Parses a QXmppBitsOfBinaryContentId
from a XEP-0231: Bits of Binary content id
In case parsing failed, the returned QXmppBitsOfBinaryContentId
is empty.
cid:
URLs to be passed. Use QXmppBitsOfBinaryContentId::fromCidUrl
for that purpose.
|
static |
Checks whether input
is a Bits of Binary content id or cid:
URL
checkIsCidUrl | If true, it only accepts cid: URLs. |
input
is valid. bool QXmppBitsOfBinaryContentId::isValid | ( | ) | const |
Checks whether the content id is valid and can be serialized into a string.
void QXmppBitsOfBinaryContentId::setAlgorithm | ( | QCryptographicHash::Algorithm | algo | ) |
Sets the hash algorithm used to calculate the hash
value
The default value is QCryptographicHash::Sha1
.
This currently supports MD4, MD5, SHA-1, SHA-2 (SHA224 - SHA512) and SHA-3 (SHA3-224 - SHA3-512).