ropensci / datapack

An R package to handle data packages
https://docs.ropensci.org/datapack
44 stars 9 forks source link

Consider SHA-256 as the default hash algorithm #117

Closed cboettig closed 3 years ago

cboettig commented 4 years ago

Creating a new DataObject generates an S4 object with a sysmeta field that uses SHA-1 as the checksum. SHA-256 might be a more collision-safe default these days.

new("DataObject", id, format="text/csv", filename=file)

Relatedly, it might be nice to let the user select the checksumAlgorithm, e.g.

new("DataObject", id, format="text/csv", filename=file, checksum = "SHA-256")
mbjones commented 4 years ago

Based on our discussion, sounds great to me @cboettig. PR welcome, or we'll try to add this on our next release.

gothub commented 3 years ago

SHA-256 is now the default for sysmeta/objects, updated in commits 9303c806d3d2c48ab9cc9ef11c02993fac6ab1f5 and ceef2d1d387d1d050c7d58be3d3c92455027f6f5