GridFS 对 mongocxx(mongodb c++ 驱动程序)的 MD5 支持
MD5 support for mongocxx (mongodb c++ driver) with GridFS
使用 c++
驱动程序将文件上传到 GridFS 存储不会在文件集合中创建 md5 条目。即:
auto uploadStream = bucket.open_upload_stream( filename );
uploadStream.write( buffer, size );
uploadStream.close();
默认使用 node.js
api(可能还有其他)代替它,(您可以选择禁用它)。
它是缺少功能还是隐藏在我看不到的地方?在任何文档中都没有提到它:
Current mongocxx documentation 3.4.0, latest at the time of writing mongocxx 3.4.0
PS:我知道这个特定文件小于 GridFS 的 16Mb 建议大小。
在 GridFS specification 中解释,md5
校验和 已弃用 。
特别是:
Why are MD5 checksums now deprecated? What should users do instead?
MD5 is prohibited by FIPS 140-2. Operating systems and libraries
operating in FIPS mode do not provide the MD5 algorithm. To avoid a
broken GridFS feature on such systems, the use of MD5 with GridFS is
deprecated, should not be added to new implementations, and should be
removed from existing implementations according to the deprecation
policy of individual drivers. Applications that desire a file digest
should implement it outside of GridFS and store it with other file
metadata.
使用 c++
驱动程序将文件上传到 GridFS 存储不会在文件集合中创建 md5 条目。即:
auto uploadStream = bucket.open_upload_stream( filename );
uploadStream.write( buffer, size );
uploadStream.close();
默认使用 node.js
api(可能还有其他)代替它,(您可以选择禁用它)。
它是缺少功能还是隐藏在我看不到的地方?在任何文档中都没有提到它:
Current mongocxx documentation 3.4.0, latest at the time of writing mongocxx 3.4.0
PS:我知道这个特定文件小于 GridFS 的 16Mb 建议大小。
在 GridFS specification 中解释,md5
校验和 已弃用 。
特别是:
Why are MD5 checksums now deprecated? What should users do instead?
MD5 is prohibited by FIPS 140-2. Operating systems and libraries operating in FIPS mode do not provide the MD5 algorithm. To avoid a broken GridFS feature on such systems, the use of MD5 with GridFS is deprecated, should not be added to new implementations, and should be removed from existing implementations according to the deprecation policy of individual drivers. Applications that desire a file digest should implement it outside of GridFS and store it with other file metadata.