protected PGPSecretKey findSecretKey ( InputStream secretKey , final long keyId ) throws IOException , PGPException { LOGGER . trace ( "findSecretKey(InputStream, long)" ) ; LOGGER . trace ( "Secret Key: {}, Key ID: {}" , secretKey == null ? "not set" : "set" , keyId ) ; return findSecretKey ( secretKey , new KeyFilter < PGPSecretKey > ( ) { @ Override public boolean accept ( PGPSecretKey secretKey ) { return secretKey . getKeyID ( ) == keyId ; } } ) ; }
helper method to read a specific secret key