Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101839287
sha1.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Feb 14, 06:22
Size
284 B
Mime Type
text/x-java
Expires
Sun, Feb 16, 06:22 (1 d, 8 h)
Engine
blob
Format
Raw Data
Handle
24237468
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
sha1.js
View Options
import
crypto
from
'crypto'
;
function
sha1
(
bytes
)
{
if
(
Array
.
isArray
(
bytes
))
{
bytes
=
Buffer
.
from
(
bytes
);
}
else
if
(
typeof
bytes
===
'string'
)
{
bytes
=
Buffer
.
from
(
bytes
,
'utf8'
);
}
return
crypto
.
createHash
(
'sha1'
).
update
(
bytes
).
digest
();
}
export
default
sha1
;
Event Timeline
Log In to Comment