pkcs5v2.h revision 155174
1170754Sdelphij/*- 2170754Sdelphij * Copyright (c) 2005 Pawel Jakub Dawidek <pjd@FreeBSD.org> 3170754Sdelphij * All rights reserved. 4170754Sdelphij * 5170754Sdelphij * Redistribution and use in source and binary forms, with or without 6170754Sdelphij * modification, are permitted provided that the following conditions 7170754Sdelphij * are met: 8170754Sdelphij * 1. Redistributions of source code must retain the above copyright 9170754Sdelphij * notice, this list of conditions and the following disclaimer. 10170754Sdelphij * 2. Redistributions in binary form must reproduce the above copyright 11170754Sdelphij * notice, this list of conditions and the following disclaimer in the 12170754Sdelphij * documentation and/or other materials provided with the distribution. 13170754Sdelphij * 14170754Sdelphij * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 15170754Sdelphij * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16170754Sdelphij * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17170754Sdelphij * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 18170754Sdelphij * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19170754Sdelphij * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20170754Sdelphij * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21170754Sdelphij * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22170754Sdelphij * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23170754Sdelphij * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24170754Sdelphij * SUCH DAMAGE. 25170754Sdelphij * 26170754Sdelphij * $FreeBSD: head/sys/geom/eli/pkcs5v2.h 155174 2006-02-01 12:06:01Z pjd $ 27170754Sdelphij */ 28170754Sdelphij 29170754Sdelphij#ifndef _PKCS5V2_H_ 30170754Sdelphij#define _PKCS5V2_H_ 31170754Sdelphijvoid pkcs5v2_genkey(uint8_t *key, unsigned keylen, const uint8_t *salt, 32170754Sdelphij size_t saltsize, const char *passphrase, u_int iterations); 33170754Sdelphij#ifndef _KERNEL 34170754Sdelphijint pkcs5v2_calculate(int usecs); 35170754Sdelphij#endif 36170754Sdelphij#endif /* !_PKCS5V2_H_ */ 37170754Sdelphij