anchor.diff:      };
   
     };
  -  
   
     ###### implementation
   
  
positive.code:           command = ''
              if test -e "${config.device}"; then
                ${if config.cipher then ''
                  # swap labels could be preserved by using --skip (PAGE_SIZE / key size)
                  # The current settings won't work on system with a PAGE_SIZE != 4096.
                  oldDevice="${config.device}"
                  device="crypt$(echo "$oldDevice" | sed -e 's,/,.,')"
                  ${cryptsetup}/sbin/cryptsetup --skip 16 -c blowfish -s 256 -d /dev/urandom create "$device" "$oldDevice"
                  ${utillinux}/sbin/swapon "/dev/mapper/$newDevice" || true
                ''
                else ''
                  device="${config.device}"
                  ${utillinux}/sbin/swapon "${config.device}" || true
                ''}
                swapDevices="$swapDevices $device"
              fi
            '';
          };
  
negative.code:             example = true;
              type = types.bool;
              description = "
                Cipher the swap device to protect swapped data.  This option
                does not work with labels.
              ";
            };
  
  