Package org.dspace.eperson

Examples of org.dspace.eperson.PasswordHash


                if (null != salt)
                    saltText = salt.getNodeValue();
                else
                    saltText = null;

                PasswordHash password;
                try {
                    password = new PasswordHash(algorithmText, saltText, element.getTextContent());
                } catch (DecoderException ex) {
                    throw new PackageValidationException("Unable to decode hexadecimal password hash or salt", ex);
                }
                eperson.setPasswordHash(password);
            }
View Full Code Here


            writer.writeEndElement();
        }
       
        if (emitPassword)
        {
            PasswordHash password = eperson.getPasswordHash();
            if (null != password)
            {
                writer.writeStartElement(PASSWORD_HASH);

                String algorithm = password.getAlgorithm();
                if (null != algorithm)
                {
                    writer.writeAttribute(PASSWORD_DIGEST, algorithm);
                }

                String salt = password.getSaltString();
                if (null != salt)
                {
                    writer.writeAttribute(PASSWORD_SALT, salt);
                }

                writer.writeCharacters(password.getHashString());
                writer.writeEndElement();
            }
        }

        if (eperson.canLogIn())
View Full Code Here

TOP

Related Classes of org.dspace.eperson.PasswordHash

Copyright © 2018 www.massapicom. 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.