protected String getPrivateKey ( ) throws Exception { String location = this . properties . getProperty ( SECRET_LOCATION ) ; if ( StringUtils . isBlank ( location ) ) { throw new DatabaseEngineException ( "Encryption was specified but there's no location specified for the private key." ) ; } File f = new File ( location ) ; if ( ! f . canRead ( ) ) { throw new DatabaseEngineException ( "Specified file '" + location + "' does not exist or the application does not have read permissions over it." ) ; } return readString ( new FileInputStream ( f ) ) . trim ( ) ; }
Reads the private key from the secret location .