1 local verse = require "verse"; |
1 local verse = require "verse"; |
2 local base64 = require "util.encodings".base64; |
2 local base64 = require "prosody.util.encodings".base64; |
3 local new_id = require "util.id".short; |
3 local new_id = require "prosody.util.id".short; |
4 |
4 |
5 local xmlns_jingle_ibb = "urn:xmpp:jingle:transports:ibb:1"; |
5 local xmlns_jingle_ibb = "urn:xmpp:jingle:transports:ibb:1"; |
6 local xmlns_ibb = "http://jabber.org/protocol/ibb"; |
6 local xmlns_ibb = "http://jabber.org/protocol/ibb"; |
7 assert(base64.encode("This is a test.") == "VGhpcyBpcyBhIHRlc3Qu", "Base64 encoding failed"); |
7 assert(base64.encode("This is a test.") == "VGhpcyBpcyBhIHRlc3Qu", "Base64 encoding failed"); |
8 assert(base64.decode("VGhpcyBpcyBhIHRlc3Qu") == "This is a test.", "Base64 decoding failed"); |
8 assert(base64.decode("VGhpcyBpcyBhIHRlc3Qu") == "This is a test.", "Base64 decoding failed"); |