Package org.geoserver.security.password

Examples of org.geoserver.security.password.RandomPasswordProvider


     * Scrambles a char array overwriting all characters with random characters, used for
     * scrambling plain text passwords after usage to avoid keeping them around in memory.
     */
    public static void scramble(char[] ch) {
        if (ch==null) return;
        RandomPasswordProvider rpp = new RandomPasswordProvider();
        rpp.getRandomPassword(ch);
    }
View Full Code Here


     * Scrambles a byte array overwriting all characters with random characters, used for
     * scrambling plain text passwords after usage to avoid keeping them around in memory.
     */
    public static void scramble(byte[] ch) {
        if (ch==null) return;
        RandomPasswordProvider rpp = new RandomPasswordProvider();
        rpp.getRandomPassword(ch);
    }
View Full Code Here

     *
     * @throws IOException
     */
    protected void addInitialKeys() throws IOException {
        //TODO:scramble
        RandomPasswordProvider randPasswdProvider =
                getSecurityManager().getRandomPassworddProvider();
       
        char[] configKey = randPasswdProvider.getRandomPasswordWithDefaultLength();
        setSecretKey( CONFIGPASSWORDKEY, configKey);
    }
View Full Code Here

       
        assertTrue(ksp.hasConfigPasswordKey());
        assertEquals("configKey",new String(ksp.getConfigPasswordKey()));
        assertFalse(ksp.hasUserGroupKey("default"));
       
        RandomPasswordProvider rpp = getSecurityManager().getRandomPassworddProvider();
        char[] urlKey = rpp.getRandomPasswordWithDefaultLength();
        //System.out.printf("Random password with length %d : %s\n",urlKey.length,new String(urlKey));
        char[] urlKey2 = rpp.getRandomPasswordWithDefaultLength();
        //System.out.printf("Random password with length %d : %s\n",urlKey2.length,new String(urlKey2));
        assertFalse(urlKey.equals(urlKey2));

        ksp.setSecretKey( KeyStoreProviderImpl.USERGROUP_PREFIX+"default"+
                    KeyStoreProviderImpl.USERGROUP_POSTFIX, "defaultKey".toCharArray());
View Full Code Here

TOP

Related Classes of org.geoserver.security.password.RandomPasswordProvider

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.