fixed bugs and added tests to BTCEncryptedMessage