keccak256: Return the Keccak-256 hash for a string

Description Usage Arguments Value References

View source: R/keccak256.R

Description

Hash a string with Keccak-256.

Usage

1
keccak256(x, truncate = TRUE, prepend_0x = FALSE)

Arguments

x

Character. The string to hash.

truncate

Logical. Truncate the hash to the first 4 bytes (8 characters)?

prepend_0x

Logical. Should the hash be prepended with 0x? Default = FALSE.

Value

Character. The hash of x, truncated to 8 characters if truncate is TRUE.

References

Uses a local copy of sha3.min.js (v0.8.0) by Yi-Cyuan Chen. This is licensed under MIT.


dapped/eth documentation built on Oct. 23, 2021, 4:42 a.m.