RStudio Launcher Plugin SDK
1.1.3
A software development kit for creating plugins that work the the RStudio Launcher.
|
#include <string>
#include <vector>
Go to the source code of this file.
Functions | |
Error | rstudio::launcher_plugins::system::crypto::aesDecrypt (const std::vector< unsigned char > &in_data, const std::vector< unsigned char > &in_key, const std::vector< unsigned char > &in_iv, std::vector< unsigned char > &out_decrypted) |
AES decrypts the specified data using the specified initialization vector. More... | |
Error | rstudio::launcher_plugins::system::crypto::aesEncrypt (const std::vector< unsigned char > &in_data, const std::vector< unsigned char > &in_key, const std::vector< unsigned char > &in_iv, std::vector< unsigned char > &out_encrypted) |
AES encrypts the specified data using the specified initialization vector. More... | |
Error | rstudio::launcher_plugins::system::crypto::aesEncrypt (const std::vector< unsigned char > &in_data, const std::vector< unsigned char > &in_key, std::vector< unsigned char > &out_encrypted) |
Error | rstudio::launcher_plugins::system::crypto::base64Decode (const std::string &in_data, std::vector< unsigned char > &out_decoded) |
Base-64 decodes a string. More... | |
Error | rstudio::launcher_plugins::system::crypto::base64Decode (const std::string &in_data, std::string &out_decoded) |
Base-64 decodes a string. More... | |
Error | rstudio::launcher_plugins::system::crypto::base64Encode (const std::vector< unsigned char > &in_data, std::string &out_encoded) |
Base-64 encodes a string. More... | |
Error | rstudio::launcher_plugins::system::crypto::base64Encode (const unsigned char *in_data, int in_length, std::string &out_encoded) |
Base-64 encodes a string. More... | |
Error | rstudio::launcher_plugins::system::crypto::decryptAndBase64Decode (const std::string &in_input, const std::string &in_key, const std::string &in_ivStr, std::string &out_decrypted) |
Base-64 decodes and then decrypts an AES encrypted string with the specified initialization vector, which is also base-64 encoded. More... | |
Error | rstudio::launcher_plugins::system::crypto::encryptAndBase64Encode (const std::string &in_input, const std::string &in_key, std::string &out_iv, std::string &out_encrypted) |
AES encrypts and then base-64 encodes the specified string using the given key. Also generates and base-64 encodes an initialization vector which is used in the encryption of the input. More... | |
Error | rstudio::launcher_plugins::system::crypto::random (uint32_t in_length, std::vector< unsigned char > &out_randomData) |
Generates random bytes of the specified length. More... | |
Cryptographic Utilities.
Error rstudio::launcher_plugins::system::crypto::aesDecrypt | ( | const std::vector< unsigned char > & | in_data, |
const std::vector< unsigned char > & | in_key, | ||
const std::vector< unsigned char > & | in_iv, | ||
std::vector< unsigned char > & | out_decrypted | ||
) |
AES decrypts the specified data using the specified initialization vector.
This function is the inverse of aesEncrypt.
in_data | The data to be decrypted. |
in_key | The key with which to decrypt the data. |
in_iv | The initialization vector that was used during encryption. |
out_decrypted | The decrypted data. |
Error rstudio::launcher_plugins::system::crypto::aesEncrypt | ( | const std::vector< unsigned char > & | in_data, |
const std::vector< unsigned char > & | in_key, | ||
const std::vector< unsigned char > & | in_iv, | ||
std::vector< unsigned char > & | out_encrypted | ||
) |
AES encrypts the specified data using the specified initialization vector.
This function is the inverse of aesDecrypt.
in_data | The data to be encrypted. |
in_key | The key with which to encrypt the data. |
in_iv | The initialization vector to use during encryption. |
out_encrypted | The encrypted data. |
Error rstudio::launcher_plugins::system::crypto::aesEncrypt | ( | const std::vector< unsigned char > & | in_data, |
const std::vector< unsigned char > & | in_key, | ||
std::vector< unsigned char > & | out_encrypted | ||
) |
Overloaded version of aesEncrypt for use without an initialization vector.
in_data | The data to be encrypted. |
in_key | The key with which to encrypt the data. |
out_encrypted | The encrypted data. |
Error rstudio::launcher_plugins::system::crypto::base64Decode | ( | const std::string & | in_data, |
std::string & | out_decoded | ||
) |
Base-64 decodes a string.
This function is the inverse of base64Encode.
in_data | The base-64 encoded data to be decoded. |
out_decoded | The decoded data. |
Error rstudio::launcher_plugins::system::crypto::base64Decode | ( | const std::string & | in_data, |
std::vector< unsigned char > & | out_decoded | ||
) |
Base-64 decodes a string.
This function is the inverse of base64Encode.
in_data | The base-64 encoded data to be decoded. |
out_decoded | The decoded data. |
Error rstudio::launcher_plugins::system::crypto::base64Encode | ( | const std::vector< unsigned char > & | in_data, |
std::string & | out_encoded | ||
) |
Base-64 encodes a string.
This function is the inverse of base64Decode.
in_data | The string data to be encoded. |
out_encoded | The base-64 encoded string. |
Error rstudio::launcher_plugins::system::crypto::base64Encode | ( | const unsigned char * | in_data, |
int | in_length, | ||
std::string & | out_encoded | ||
) |
Base-64 encodes a string.
This function is the inverse of base64Decode.
in_data | The string data to be encoded. |
in_length | The length of in_data. |
out_encoded | The base-64 encoded string. |
Error rstudio::launcher_plugins::system::crypto::decryptAndBase64Decode | ( | const std::string & | in_input, |
const std::string & | in_key, | ||
const std::string & | in_ivStr, | ||
std::string & | out_decrypted | ||
) |
Base-64 decodes and then decrypts an AES encrypted string with the specified initialization vector, which is also base-64 encoded.
This function is the inverse of encryptAndBase64Encode.
in_input | The base-64 encoded AES encrypted string. |
in_key | The key with which to decrypt the string. |
in_ivStr | The base-64 encrypted initialization vector. |
out_decrypted | The base-64 decoded and decrypted string. |
Error rstudio::launcher_plugins::system::crypto::encryptAndBase64Encode | ( | const std::string & | in_input, |
const std::string & | in_key, | ||
std::string & | out_iv, | ||
std::string & | out_encrypted | ||
) |
AES encrypts and then base-64 encodes the specified string using the given key. Also generates and base-64 encodes an initialization vector which is used in the encryption of the input.
This function is the inverse of decryptAndBase64Decode.
in_input | The string to encrypt and base-64 encode. |
in_key | The key with which to encrypt the string. |
out_iv | The generated base-64 encoded initialization vector. |
out_encrypted | The encrypted and base-64 encoded string. |
Error rstudio::launcher_plugins::system::crypto::random | ( | uint32_t | in_length, |
std::vector< unsigned char > & | out_randomData | ||
) |
Generates random bytes of the specified length.
This function uses openSSL to generate random data. Summarized from the openSSL documentation: The bytes are generated using a cryptographically secure pseudo random generator. The quality of the randomness is determined by the operating system's entropy source. If an entropy source fails or isn't available, an error will be returned.
in_length | The number of bytes of random data to generate. |
out_randomData | The random data. |