R/stream.R

Defines functions hmac_final hmac_feed hmac_init md_final md_feed md_init

#' @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)
}

Try the openssl package in your browser

Any scripts or data that you put into this service are public.

openssl documentation built on Sept. 26, 2023, 1:09 a.m.