diff options
author | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-04-12 10:02:48 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-04-12 10:02:48 +0200 |
commit | d936a830e4866f070ba7726ecb845cc66644a238 (patch) | |
tree | 459db6ae6f15c7c6fabb5a25842f099b5183c534 /src/eu/siacs/conversations/xmpp/jingle/stanzas | |
parent | 96be96f9f8a7ccae492f87ac703585bc6ac2e7b1 (diff) |
add sha1 sum to file
Diffstat (limited to '')
-rw-r--r-- | src/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java b/src/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java index 27d6b9e36..304656eed 100644 --- a/src/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java +++ b/src/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java @@ -15,12 +15,13 @@ public class Content extends Element { super("content"); } - public void offerFile(File actualFile) { + public void offerFile(File actualFile, String hash) { Element description = this.addChild("description", "urn:xmpp:jingle:apps:file-transfer:3"); Element offer = description.addChild("offer"); Element file = offer.addChild("file"); file.addChild("size").setContent(""+actualFile.length()); file.addChild("name").setContent(actualFile.getName()); + file.addChild("hash","urn:xmpp:hashes:1").setAttribute("algo", "sha-1").setContent(hash); } public void setCandidates(String transportId, List<Element> canditates) { |