Examples of AesCipherService


Examples of org.apache.shiro.crypto.AesCipherService

   
    public ShiroSecurityTokenInjector() {
        this.passPhrase = bits128;

        // Set up AES encryption based cipher service, by default
        cipherService = new AesCipherService();
    }
View Full Code Here

Examples of org.apache.shiro.crypto.AesCipherService

    private boolean alwaysReauthenticate;
   
    public ShiroSecurityPolicy() {
        this.passPhrase = bits128;
        // Set up AES encryption based cipher service, by default
        cipherService = new AesCipherService();
        permissionsList = new ArrayList<Permission>();
        alwaysReauthenticate = true;
    }  
View Full Code Here

Examples of org.apache.shiro.crypto.AesCipherService

     * @param password password to encrypt in plain text
     * @param key      the encryption key
     * @return encrypted password in base64 encoding
     */
    public static String encryptPassword(String password, byte[] key) {
        AesCipherService cipherService = new AesCipherService();
        ByteSource encrypted = cipherService.encrypt(password.getBytes(), key);
        return encrypted.toBase64();
    }
View Full Code Here

Examples of org.apache.shiro.crypto.AesCipherService

     * @param password the password to decrypt in base64 encoding
     * @param key      the key used to encrypt the password
     * @return decrypted password in plain text
     */
    public static String decryptPassword(String password, byte[] key) {
        AesCipherService cipherService = new AesCipherService();
        ByteSource decrypted = cipherService.decrypt(Base64.decode(password), key);
        return new String(decrypted.getBytes());
    }
View Full Code Here

Examples of org.apache.shiro.crypto.AesCipherService

     * Returns a new encryption key
     *
     * @return encryption key in base64 encoding
     */
    public static String generateNewKey() {
        AesCipherService cipherService = new AesCipherService();
        Key newKey = cipherService.generateNewKey();
        return new SimpleByteSource(newKey.getEncoded()).toBase64();
    }
View Full Code Here

Examples of org.apache.shiro.crypto.AesCipherService

   
    public ShiroSecurityTokenInjector() {
        this.passPhrase = bits128;

        // Set up AES encryption based cipher service, by default
        cipherService = new AesCipherService();
    }
View Full Code Here

Examples of org.apache.shiro.crypto.AesCipherService

     * Default constructor that initializes a {@link DefaultSerializer} as the {@link #getSerializer() serializer} and
     * an {@link AesCipherService} as the {@link #getCipherService() cipherService}.
     */
    public AbstractRememberMeManager() {
        this.serializer = new DefaultSerializer<PrincipalCollection>();
        this.cipherService = new AesCipherService();
        setCipherKey(DEFAULT_CIPHER_KEY_BYTES);
    }
View Full Code Here

Examples of org.apache.shiro.crypto.AesCipherService

    return fmt.format(date);
  }

  private static byte[] encrypt(byte[] serialized) {
    byte[] value = serialized;
    CipherService cipherService = new AesCipherService();
    if (cipherService != null) {
      ByteSource byteSource = cipherService.encrypt(serialized, Base64.decode("kPH+bIxk5D2deZiIxcaaaA=="));
      value = byteSource.getBytes();
    }
    return value;
  }
View Full Code Here

Examples of org.apache.shiro.crypto.AesCipherService

    private boolean base64;
   
    public ShiroSecurityPolicy() {
        this.passPhrase = bits128;
        // Set up AES encryption based cipher service, by default
        cipherService = new AesCipherService();
        permissionsList = new ArrayList<Permission>();
        alwaysReauthenticate = true;
    }  
View Full Code Here

Examples of org.apache.shiro.crypto.AesCipherService

   
    public ShiroSecurityTokenInjector() {
        this.passPhrase = bits128;

        // Set up AES encryption based cipher service, by default
        cipherService = new AesCipherService();
    }
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.