Skip to contents

Is it a SHA-1 digest?

Usage

is_sha1(x)

Arguments

x

A character vector.

Value

Logical vector; TRUE for a 40-character hex string.

See also

Other hash detectors: is_guid(), is_md5(), is_sha256()

Examples

is_sha1(c("da39a3ee5e6b4b0d3255bfef95601890afd80709", NA))
#> [1] TRUE   NA