# File lib/hiera/backend/eyaml/parser/encrypted_tokens.rb, line 35
          def to_encrypted(args={})
            label = args[:label]
            label_string = label.nil? ? '' : "#{label}: "
            format = args[:format].nil? ? @format : args[:format]
            case format
              when :block
                # strip any white space
                @cipher = @cipher.gsub(/ /m, "")
                # normalize indentation
                ciphertext = @cipher.gsub(/\n/, "\n" + @indentation)
                chevron = (args[:use_chevron].nil? || args[:use_chevron]) ? ">\n" : ''
                "#{label_string}#{chevron}" + @indentation + "ENC[#{@encryptor.tag},#{ciphertext}]"
              when :string
                ciphertext = @cipher.gsub(/\n/, "")
                "#{label_string}ENC[#{@encryptor.tag},#{ciphertext}]"
              else
                raise "#{@format} is not a valid format"
            end
          end