// Path: app/src/main/java/com/reddyetwo/hashmypass/app/util/Constants.java
// public class Constants {
// 
//     public static final String FONT_MONOSPACE = "UbuntuMono-Regular.ttf";
//     public static final int MIN_PASSWORD_LENGTH = 4;
//     public static final int MAX_PASSWORD_LENGTH = 26;
//     public static final int DEFAULT_PASSWORD_LENGTH = 8;
// 
//     private Constants() {
// 
//     }
// 
// }
// 
// Path: app/src/main/java/com/reddyetwo/hashmypass/app/util/RandomPrivateKeyGenerator.java
// public class RandomPrivateKeyGenerator {
// 
//     private static final int[] SUBGROUPS_LENGTH = {8, 4, 4, 4, 12};
//     private static final char SUBGROUP_SEPARATOR = '-';
//     private static final String ALLOWED_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
// 
//     private RandomPrivateKeyGenerator() {
// 
//     }
// 
//     /**
//      * Generate a random private key
//      *
//      * @return the random private key
//      */
//     public static String generate() {
//         SecureRandom sr = new SecureRandom();
//         String key = "";
//         int allowedCharsLength = ALLOWED_CHARS.length();
// 
//         for (int i = 0; i < SUBGROUPS_LENGTH.length; i++) {
//             for (int j = 0; j < SUBGROUPS_LENGTH[i]; j++) {
//                 key = key + ALLOWED_CHARS.charAt(sr.nextInt(allowedCharsLength));
//             }
//             if (i < SUBGROUPS_LENGTH.length - 1) {
//                 key += SUBGROUP_SEPARATOR;
//             }
//         }
// 
//         return key;
//     }
// }


import com.reddyetwo.hashmypass.app.util.Constants;
import com.reddyetwo.hashmypass.app.util.RandomPrivateKeyGenerator;
/*
 * Copyright 2014 Red Dye No. 2
 *
 * This file is part of Twik.
 *
 * Twik is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Twik is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Twik.  If not, see <http://www.gnu.org/licenses/>.
 */


package com.reddyetwo.hashmypass.app.data;


/**
 * POJO class for profiles
 */
public class Profile {

    public static final long NO_ID = -1;

    private long mId = NO_ID;
    private String mName = "";
    private String mPrivateKey = RandomPrivateKeyGenerator.generate();
// Path: app/src/main/java/com/reddyetwo/hashmypass/app/util/Constants.java
// public class Constants {
// 
//     public static final String FONT_MONOSPACE = "UbuntuMono-Regular.ttf";
//     public static final int MIN_PASSWORD_LENGTH = 4;
//     public static final int MAX_PASSWORD_LENGTH = 26;
//     public static final int DEFAULT_PASSWORD_LENGTH = 8;
// 
//     private Constants() {
// 
//     }
// 
// }
// 
// Path: app/src/main/java/com/reddyetwo/hashmypass/app/util/RandomPrivateKeyGenerator.java
// public class RandomPrivateKeyGenerator {
// 
//     private static final int[] SUBGROUPS_LENGTH = {8, 4, 4, 4, 12};
//     private static final char SUBGROUP_SEPARATOR = '-';
//     private static final String ALLOWED_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
// 
//     private RandomPrivateKeyGenerator() {
// 
//     }
// 
//     /**
//      * Generate a random private key
//      *
//      * @return the random private key
//      */
//     public static String generate() {
//         SecureRandom sr = new SecureRandom();
//         String key = "";
//         int allowedCharsLength = ALLOWED_CHARS.length();
// 
//         for (int i = 0; i < SUBGROUPS_LENGTH.length; i++) {
//             for (int j = 0; j < SUBGROUPS_LENGTH[i]; j++) {
//                 key = key + ALLOWED_CHARS.charAt(sr.nextInt(allowedCharsLength));
//             }
//             if (i < SUBGROUPS_LENGTH.length - 1) {
//                 key += SUBGROUP_SEPARATOR;
//             }
//         }
// 
//         return key;
//     }
// }


// Path: app/src/main/java/com/reddyetwo/hashmypass/app/data/Profile.java
import com.reddyetwo.hashmypass.app.util.Constants;
import com.reddyetwo.hashmypass.app.util.RandomPrivateKeyGenerator;

/*
 * Copyright 2014 Red Dye No. 2
 *
 * This file is part of Twik.
 *
 * Twik is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Twik is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Twik.  If not, see <http://www.gnu.org/licenses/>.
 */


package com.reddyetwo.hashmypass.app.data;


/**
 * POJO class for profiles
 */
public class Profile {

    public static final long NO_ID = -1;

    private long mId = NO_ID;
    private String mName = "";
    private String mPrivateKey = RandomPrivateKeyGenerator.generate();
    private int mPasswordLength = Constants.DEFAULT_PASSWORD_LENGTH;