-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright (C) 2024 Hibiki AI Limited <[email protected]> | ||
# Copyright (C) 2024-2025 Hibiki AI Limited <[email protected]> | ||
# | ||
# This file is part of secretbase. | ||
# | ||
|
@@ -20,23 +20,23 @@ | |
#' | ||
#' Encodes a character string, raw vector or other object to base64 encoding. | ||
#' | ||
#' A character string or raw vector (with no attributes) is encoded | ||
#' \emph{as is}, whilst all other objects are first serialized (using R | ||
#' serialisation version 3, big-endian representation). | ||
#' A character string or raw vector (with no attributes) is encoded *as is*, | ||
#' whilst all other objects are first serialized (using R serialisation version | ||
#' 3, big-endian representation). | ||
#' | ||
#' @param x an object. | ||
#' @param convert [default TRUE] logical TRUE to encode to a character string or | ||
#' FALSE to a raw vector. | ||
#' @param convert logical TRUE to encode to a character string or FALSE to a raw | ||
#' vector. | ||
#' | ||
#' @return A character string or raw vector depending on the value of | ||
#' \sQuote{convert}. | ||
#' | ||
#' @references | ||
#' This implementation is based that by 'The Mbed TLS Contributors' under the | ||
#' 'Mbed TLS' Trusted Firmware Project at | ||
#' \url{https://www.trustedfirmware.org/projects/mbed-tls}. | ||
#' <https://www.trustedfirmware.org/projects/mbed-tls>. | ||
#' | ||
#' @seealso \code{\link{base64dec}} | ||
#' @seealso [base64dec()] | ||
#' | ||
#' @examples | ||
#' base64enc("secret base") | ||
|
@@ -56,9 +56,9 @@ base64enc <- function(x, convert = TRUE) .Call(secretbase_base64enc, x, convert) | |
#' objects), in order to return the original object. | ||
#' | ||
#' @param x an object. | ||
#' @param convert [default TRUE] logical TRUE to convert back to a character | ||
#' string, FALSE to convert back to a raw vector or NA to decode and then | ||
#' unserialize back to the original object. | ||
#' @param convert logical TRUE to convert back to a character string, FALSE to | ||
#' convert back to a raw vector or NA to decode and then unserialize back to | ||
#' the original object. | ||
#' | ||
#' @return A character string, raw vector, or other object depending on the | ||
#' value of \sQuote{convert}. If conversion to a character string fails, a raw | ||
|
@@ -67,9 +67,9 @@ base64enc <- function(x, convert = TRUE) .Call(secretbase_base64enc, x, convert) | |
#' @references | ||
#' This implementation is based that by 'The Mbed TLS Contributors' under the | ||
#' 'Mbed TLS' Trusted Firmware Project at | ||
#' \url{https://www.trustedfirmware.org/projects/mbed-tls}. | ||
#' <https://www.trustedfirmware.org/projects/mbed-tls>. | ||
#' | ||
#' @seealso \code{\link{base64enc}} | ||
#' @seealso [base64enc()] | ||
#' | ||
#' @examples | ||
#' base64dec(base64enc("secret base")) | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.