[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Encoding of userPassword entries
>
> my $sha = new SHA;
> my $base64 = encode_base64($sha->hash(param('password1')));
> chomp($base64);
> $params{'userPassword'} = [('{SHA}' . $base64)];
>
Ahh, that's right. Then you can do:
my $base64 = encode_base64($sha->hash(param('password1')),"");
That should make it leave off the newline (I've used then in a few scripts
when importing stuff into LDAP with Net::LDAP aswell).
Ben
--
-----------=======-=-======-=========-----------=====------------=-=------
/ Ben Collins -- ...on that fantastic voyage... -- Debian GNU/Linux \
` bcollins@debian.org -- bcollins@openldap.org -- bmc@visi.net '
`---=========------=======-------------=-=-----=-===-======-------=--=---'