# man > Authen::SASL::SASLprep(3pm)

---
type: CommandReference
command: Authen::SASL::SASLprep
mode: perldoc
section: 3pm
source: perldoc
---

## Quick Reference

- `saslprep $input` — Prepare a query string for SASL comparison.
- `saslprep $stored, 1` — Prepare a stored string (throws exception on unassigned characters).

## Name

Authen::SASL::SASLprep - A Stringprep Profile for User Names and Passwords (RFC 4013)

## Synopsis

perl
use Authen::SASL::SASLprep;
$output_query = saslprep $input;
$output_stored = saslprep $stored;
## Options

- `$input` — The string to prepare as a query string (unassigned characters allowed).
- `$stored` (boolean) — If true, process as a stored string (throws exception on characters unassigned in Unicode 3.2). Default is false (query string).

## Description

This module implements the SASLprep specification (RFC 4013) for preparing Unicode strings representing user names and passwords for comparison. It is a profile of the stringprep algorithm.

## Functions

- `saslprep($input, [$stored])` — Processes $input according to SASLprep. Returns the prepared string. Throws an exception if $input contains disallowed characters. If $stored is true, characters unassigned in Unicode 3.2 cause an exception. For query strings (default), unassigned characters are allowed.

## See Also

- [Unicode::Stringprep](http://localhost/phpMan.php/perldoc/Unicode::Stringprep/markdown) — The underlying stringprep implementation.
- RFC 4013 — [http://www.ietf.org/rfc/rfc4013.txt](http://www.ietf.org/rfc/rfc4013.txt)