2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 2N/A * If a new enum value is added to ucrypto_mech_t AND support for that new 2N/A * mechanism is implemented by this library, it must also be inserted here 2N/A * in mechstrlist in the same order it appears in the ucrypto_mech_t enum. 2N/A * ucrypto_id2mech() uses bsearch() to traverse the list, thus order matters. 2N/A * JDK hardwired to the ucrypto_mech_t enum values. Do not change existing 2N/A * enum values. Do not add an entry here if only the enum value is defined, 2N/A * but there is no actual support implemented for the mechanism. See also 2N/A * the comment for ucrypto_mech_t. 2N/A/* bsearch compare function */ 2N/A/* Returns the string value of the mechanism for a given mechanism number */ 2N/A * Return a delimited string of supported mechanisms with their 2N/A pos++;
/* Need to count the NULL */ 2N/A * With a given mechanism string value, match it with the supported 2N/A * mechanism and return the mechanism number, if found; otherwise, it 2N/A * returns an undefined mech number.