File: stream.R

package info (click to toggle)
r-cran-openssl 1.4.3%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,288 kB
  • sloc: ansic: 3,021; sh: 97; makefile: 5
file content (36 lines) | stat: -rw-r--r-- 775 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#' @useDynLib openssl R_md_init
md_init <- function(algo){
  .Call(R_md_init, as.character(algo))
}

#' @useDynLib openssl R_md_feed
md_feed <- function(md, data){
  stopifnot(inherits(md, "md"))
  stopifnot(is.raw(data))
  .Call(R_md_feed, md, data)
}

#' @useDynLib openssl R_md_final
md_final <- function(md){
  stopifnot(inherits(md, "md"))
  .Call(R_md_final, md)
}

#' @useDynLib openssl R_hmac_init
hmac_init <- function(algo, key){
  .Call(R_hmac_init, as.character(algo), key)
}

#' @useDynLib openssl R_hmac_feed
hmac_feed <- function(ptr, data){
  stopifnot(inherits(ptr, "md"))
  stopifnot(is.raw(data))
  .Call(R_hmac_feed, ptr, data)
}

#' @useDynLib openssl R_hmac_final
hmac_final <- function(md){
  stopifnot(inherits(md, "md"))
  .Call(R_hmac_final, md)
}