Print this page
4185 add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R (fix studio build)
4185 add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Approved by: Garrett D'Amore <garrett@damore.org>
Moved closed ZFS files to open repo, changed Makefiles accordingly
Removed unneeded weak symbols
re #12585 rb4049 ZFS++ work port - refactoring to improve separation of open/closed code, bug fixes, performance improvements - open code


   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.

  24  */
  25 /*
  26  * Copyright 2013 Saso Kiselkov. All rights reserved.
  27  * Copyright (c) 2016 by Delphix. All rights reserved.
  28  */
  29 #include <sys/zfs_context.h>
  30 #include <sys/zio.h>
  31 #include <sys/sha2.h>
  32 #include <sys/abd.h>
  33 
  34 static int
  35 sha_incremental(void *buf, size_t size, void *arg)
  36 {
  37         SHA2_CTX *ctx = arg;
  38         SHA2Update(ctx, buf, size);
  39         return (0);
  40 }
  41 
  42 /*ARGSUSED*/
  43 void




   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
  25  */
  26 /*
  27  * Copyright 2013 Saso Kiselkov. All rights reserved.
  28  * Copyright (c) 2016 by Delphix. All rights reserved.
  29  */
  30 #include <sys/zfs_context.h>
  31 #include <sys/zio.h>
  32 #include <sys/sha2.h>
  33 #include <sys/abd.h>
  34 
  35 static int
  36 sha_incremental(void *buf, size_t size, void *arg)
  37 {
  38         SHA2_CTX *ctx = arg;
  39         SHA2Update(ctx, buf, size);
  40         return (0);
  41 }
  42 
  43 /*ARGSUSED*/
  44 void