base64                 package:RCurl                 R Documentation

_E_n_c_o_d_e/_D_e_c_o_d_e _b_a_s_e_6_4 _c_o_n_t_e_n_t

_D_e_s_c_r_i_p_t_i_o_n:

     These functions encode and decode strings using base64
     representations. 'base64' can be used as  a single entry point
     with an argument to  encode or decode. The other two functions
     perform the specific action.

_U_s_a_g_e:

     base64(txt, encode = !inherits(txt, "base64"), mode = "character")

_A_r_g_u_m_e_n_t_s:

     txt: character string to encode or decode

  encode: logical value indicating whether the desired action is to
          encode or decode the object. If 'txt' has (S3) class
          'base64', the default is to decode this. 

    mode: a character string giving either 

_D_e_t_a_i_l_s:

     This calls the routines in libcurl. These are not declared in the
     curl header files. So the support may need to be handled carefully
     on some platforms, e.g. Microsoft Windows.

_V_a_l_u_e:

     If encode is 'TRUE', a character vector with a class named
     'base64'. If decode is 'TRUE', a simple string.

_N_o_t_e:

     This is currently not vectorized.

     We might extend this to work with raw objects.

_A_u_t_h_o_r(_s):

     Duncan Temple Lang

_R_e_f_e_r_e_n_c_e_s:

     <URL: http://curl.haxx.se>{libcurl} <URL:
     http://en.wikipedia.org/wiki/Base64>{Wikipedia's explanation of
     base 64 encoding}

_S_e_e _A_l_s_o:

_E_x_a_m_p_l_e_s:

         # encode and then decode a simple string.
       x = base64("Some simple text for base 64 to handle")
       base64(x)

         # encode to a raw vector
       x = base64("Simple text", TRUE, "raw")

         # decode to a character string.
       ans = base64Decode(x)
         # decoded to a raw format.
       ans = base64Decode(x, "raw")

