constructHashElement function

XMLNode constructHashElement(
  1. HashFunction hash,
  2. String value
)

Helper method for building a element according to XEP-0300.

Implementation

XMLNode constructHashElement(HashFunction hash, String value) {
  return XMLNode.xmlns(
    tag: 'hash',
    xmlns: hashXmlns,
    attributes: {'algo': hash.toName()},
    text: value,
  );
}