getPwd: Get ACC password from the acckey.pem file

Description Usage Arguments Value Author(s) See Also Examples

Description

If the acckey.pem file already exists, it extracts the cipher text from it and decrypt it into key string. Otherwise, it will call inputPwd to enter the password.
Note that this function returns an encrypted raw vector which needs to be decrypt_ited.

Usage

1
2
3
getPwd(overide = FALSE)

get_pwd(overide = FALSE)

Arguments

overide

logical, if overide existing acckey.pem and input password again. Default FALSE.

Value

invisible (a encrypted raw vector)

Author(s)

Yiying Wang, wangy@aetna.com

See Also

inputPwd decrypt_it

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
func <- function() {
    con <- DBI::dbConnect(odbc::odbc(), .connection_string=paste0(
        "Driver={Microsfot Access Driver (*.mdb, *.accdb)};",
        "Dbq=testdb.accdb;uid=;pwd=", decrypt_it(getPwd())))
    return(DBI::dbGetQuery(con, "select * from table1"))
} 

## End(Not run)

madlogos/aseshms documentation built on May 21, 2019, 11:03 a.m.