Fixed key exchange mechanism and base64 wrapping
Merge remote-tracking branch 'origin/master'