R/tlsh-hash.R
changed.
Showing 1 of 1 files from the diff.
@@ -6,6 +6,10 @@
Loading
6 | 6 | #' @param x length 1 `character` or `raw` vector |
|
7 | 7 | #' @export |
|
8 | 8 | tlsh_simple_hash <- function(x) { |
|
9 | + | if (is.na(x) | is.null(x)) { |
|
10 | + | warning("Invalid byte stream") |
|
11 | + | return(NA_character_) |
|
12 | + | } |
|
9 | 13 | if (inherits(x, "character")) { |
|
10 | 14 | x <- x[1] |
|
11 | 15 | if (nchar(x) < 50L) { |
33.1
34.1
35.1
36.1
28.1
29.1
30.1
32.1
37.1
38.1
10.1
14.1
69.1
67.1
64.1
63.1
66.1
65.1
60.1