R/RcppExports.R

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' Wrapper for the Windows DPAPI function CryptProtectData()
#'
#' This function is intended to be an internal helper file for the package.
#' Both parameters are currently necessary, and bust be between 1 and 256 bytes
#' in length. The salt should be generated using PKI::PKI.random(), or some
#' other cryptographically stron random number generator.
#'
#' @param pwd The raw representation of the string top be encrypted
#' @param salt A vector of randomly generated bytes
#'
#' @export
CryptProtectData <- function(pwd, salt) {
    .Call('_winlockr_CryptProtectData', PACKAGE = 'winlockr', pwd, salt)
}

#' A wrapper for the Windows DPAPI function CryptUnprotectData()
#'
#' This function is intended to be an internal helper file for the package.
#' Both parameters are currently necessary, and bust be between 1 and 256 bytes
#' in length. The salt should be the one used to encrypt pwd in the first place
#'
#' @param pwd The raw bytes of the encrypted password
#' @param salt The raw bytes of the salt used when the password was encrypted
#'
#' @export
CryptUnprotectData <- function(pwd, salt) {
    .Call('_winlockr_CryptUnprotectData', PACKAGE = 'winlockr', pwd, salt)
}
cpbonnell/winlockr documentation built on May 28, 2019, 7:47 p.m.