Examples of verifyPassword()


Examples of org.apache.poi.poifs.crypt.Decryptor.verifyPassword()

     
          try {
        POIFSFileSystem fs = new POIFSFileSystem(is);
        EncryptionInfo info = new EncryptionInfo(fs);
            Decryptor d = Decryptor.getInstance(info);
            d.verifyPassword(password);
           
        InputStream is2 = d.getDataStream(fs);
        final LoadFromZipNG loader = new LoadFromZipNG();
        return loader.get(is2);       
       
View Full Code Here

Examples of org.apache.poi.poifs.crypt.Decryptor.verifyPassword()

                case ENCRYPTED:
                    EncryptionInfo info = new EncryptionInfo(filesystem);
                    Decryptor d = Decryptor.getInstance(info);

                    try {
                        if (!d.verifyPassword(Decryptor.DEFAULT_PASSWORD)) {
                            throw new EncryptedDocumentException();
                        }

                        OOXMLParser parser = new OOXMLParser();
View Full Code Here

Examples of org.apache.poi.poifs.crypt.Decryptor.verifyPassword()

                     password = suppliedPassword;
                 }
              }
             
              // Check if we've the right password or not
              if (!d.verifyPassword(password)) {
                 throw new EncryptedDocumentException();
              }

              // Decrypt the OLE2 stream, and delegate the resulting OOXML
              //  file to the regular OOXML parser for normal handling
View Full Code Here

Examples of org.apache.poi.poifs.crypt.Decryptor.verifyPassword()

                case ENCRYPTED:
                    EncryptionInfo info = new EncryptionInfo(root);
                    Decryptor d = Decryptor.getInstance(info);

                    try {
                        if (!d.verifyPassword(Decryptor.DEFAULT_PASSWORD)) {
                            throw new EncryptedDocumentException();
                        }

                        OOXMLParser parser = new OOXMLParser();
View Full Code Here

Examples of org.apache.poi.poifs.crypt.Decryptor.verifyPassword()

              if (passwordProvider != null) {
                 password = passwordProvider.getPassword(metadata);
              }
             
              // Check if we've the right password or not
              if (!d.verifyPassword(password)) {
                 throw new EncryptedDocumentException();
              }

              // Decrypt the OLE2 stream, and delegate the resulting OOXML
              //  file to the regular OOXML parser for normal handling
View Full Code Here

Examples of org.apache.poi.poifs.crypt.Decryptor.verifyPassword()

                case ENCRYPTED:
                    EncryptionInfo info = new EncryptionInfo(filesystem);
                    Decryptor d = new Decryptor(info);

                    try {
                        if (!d.verifyPassword(Decryptor.DEFAULT_PASSWORD)) {
                            throw new TikaException("Unable to process: document is encrypted");
                        }

                        OOXMLParser parser = new OOXMLParser();
View Full Code Here

Examples of org.apache.poi.poifs.crypt.agile.AgileDecryptor.verifyPassword()

        bos.close();
       
        fs = new POIFSFileSystem(new ByteArrayInputStream(bos.toByteArray()));
        info = new EncryptionInfo(fs);
        AgileDecryptor agDec = (AgileDecryptor)info.getDecryptor();
        boolean passed = agDec.verifyPassword(certData.keypair, certData.x509);
        assertTrue("certificate verification failed", passed);
       
        fis = agDec.getDataStream(fs);
        byte byteActual[] = IOUtils.toByteArray(fis);
        fis.close();
View Full Code Here

Examples of org.apache.qpid.server.security.auth.database.PrincipalDatabase.verifyPassword()

    {
        final PrincipalDatabase db = ApplicationRegistry.getInstance().getDatabaseManager().getDatabases().values().iterator().next();

        try
        {
            if (db.verifyPassword(username, password.toCharArray()))
            {
                final Subject subject = new Subject();
                subject.getPrincipals().add(new UsernamePrincipal(username));
                return new AuthenticationResult(subject);
            }
View Full Code Here

Examples of org.jahia.services.usermanager.JahiaUser.verifyPassword()

                String user = cred.substring(0,colonInd);
                String pass = cred.substring(colonInd+1);

                JahiaUser jahiaUser = ServicesRegistry.getInstance().getJahiaUserManagerService().lookupUser(user);
                if (jahiaUser != null) {
                    if (jahiaUser.verifyPassword(pass)) {
                        if (logger.isDebugEnabled()) {
                            logger.debug("User " + user + " authenticated.");
                        }
                        if (isAccounteLocked(jahiaUser)) {
                            logger.debug("Login failed. Account is locked for user " + user);
View Full Code Here

Examples of org.jahia.services.usermanager.JahiaUser.verifyPassword()

                    JahiaUserManagerService theService = theRegistry.getJahiaUserManagerService();
                    if (theService != null) {
                        // Check if the user has site access ( even though it is not a user of this site )
                        theUser = ServicesRegistry.getInstance().getJahiaUserManagerService().lookupUser(username);
                        if (theUser != null) {
                            if (theUser.verifyPassword(password)) {
                                if (!isAccounteLocked(theUser)) {
                                    ok = true;
                                } else {
                                    logger.warn("Login failed: account for user " + theUser.getUsername() + " is locked.");
                                    httpServletRequest.setAttribute(VALVE_RESULT, ACCOUNT_LOCKED);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.