@ Override public Key engineGetKey ( String s , char [ ] chars ) throws NoSuchAlgorithmException , UnrecoverableKeyException { CredentialWrapper credential = getKeyEntry ( s ) ; Key key = null ; if ( credential != null ) { try { String password = null ; if ( chars != null ) { password = new String ( chars ) ; } key = credential . getCredential ( ) . getPrivateKey ( password ) ; } catch ( ResourceStoreException e ) { throw new UnrecoverableKeyException ( e . getMessage ( ) ) ; } catch ( CredentialException e ) { throw new UnrecoverableKeyException ( e . getMessage ( ) ) ; } } return key ; }
Get the key referenced by the specified alias .