protected byte[] encrypt(byte[] serialized) {
        byte[] value = serialized;
        CipherService cipherService = getCipherService();
        if (cipherService != null) {
            ByteSource byteSource = cipherService.encrypt(serialized, getEncryptionCipherKey());
            value = byteSource.getBytes();
        }
        return value;
    }
Encrypts the byte array by using the configured {@link #getCipherService() cipherService}.

@param serialized the serialized object byte array to be encrypted
@return an encrypted byte array returned by the configured {@link #getCipherService () cipher}.
core/src/main/java/org/apache/shiro/mgt/AbstractRememberMeManager.java