我有一个像这样的示例 mongo 文档:
> db.chat.find().pretty()
{
"_id": ObjectId("555f1c0c7f4b820758b439b0"),
"user": "Guest1",
"friend": [{
"userfriend": "Guest2",
"noidung": [{
"method": "send",
"date": "2015-05-22T19:11:34+07:00",
"content": "allloooo"
}, {
"method": "receive",
"date": "2015-05-23T09:08:14+07:00",
"content": "yes man"
}]
}, {
"userfriend": "Guest3",
"noidung": [{
"method": "send",
"date": "2015-05-23T15:42:34+07:00",
"content": "foo 15:42"
}, {
"method": "receive",
"date": "2015-05-23T15:42:45+07:00",
"content": "bar 15:43"
}]
}]
}
Run Code Online (Sandbox Code Playgroud)
在我的 server.js 中,我使用以下代码来打印所有数据:
var chathistory = db.collection('chat');
chathistory.find().toArray(function (err, docs) {
console.log(docs)
});
Run Code Online (Sandbox Code Playgroud)
我在终端中收到此日志:
[ { _id: 555f1c0c7f4b820758b439b0,
user: 'Guest1',
friend: [ [Object], …Run Code Online (Sandbox Code Playgroud) 我正在编写通用应用程序,如何使用md5或SHA算法散列文件?
我搜索了一下,发现了这个:system.security.cryptography但是我的项目中没有它.
我正在使用Visual Studio 2015.