boolean hasSecretKey ( ) { String path = getPathToSecretKey ( ) ; if ( StringUtils . isNotBlank ( path ) ) { File file = new File ( path ) ; return file . exists ( ) && file . isFile ( ) ; } return false ; }
This method checks the existence of the file but not the validity of the contained key .