< prev index next >

src/java.base/share/classes/javax/crypto/ExemptionMechanism.java

Print this page


   1 /*
   2  * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  97      */
  98     public final String getName() {
  99         return this.mechanism;
 100     }
 101 
 102     /**
 103      * Returns an <code>ExemptionMechanism</code> object that implements the
 104      * specified exemption mechanism algorithm.
 105      *
 106      * <p> This method traverses the list of registered security Providers,
 107      * starting with the most preferred Provider.
 108      * A new ExemptionMechanism object encapsulating the
 109      * ExemptionMechanismSpi implementation from the first
 110      * Provider that supports the specified algorithm is returned.
 111      *
 112      * <p> Note that the list of registered providers may be retrieved via
 113      * the {@link Security#getProviders() Security.getProviders()} method.
 114      *
 115      * @implNote
 116      * The JDK Reference Implementation additionally uses the
 117      * {@code jdk.security.provider.preferred} property to determine

 118      * the preferred provider order for the specified algorithm. This
 119      * may be different than the order of providers returned by
 120      * {@link Security#getProviders() Security.getProviders()}.
 121      *
 122      * @param algorithm the standard name of the requested exemption
 123      * mechanism.
 124      * See the ExemptionMechanism section in the
 125      * <a href=
 126      *   "{@docRoot}/../technotes/guides/security/StandardNames.html#Exemption">
 127      * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
 128      * for information about standard exemption mechanism names.
 129      *
 130      * @return the new <code>ExemptionMechanism</code> object.
 131      *
 132      * @exception NullPointerException if <code>algorithm</code>
 133      *          is null.
 134      *
 135      * @exception NoSuchAlgorithmException if no Provider supports an
 136      *          ExemptionMechanismSpi implementation for the
 137      *          specified algorithm.


   1 /*
   2  * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  97      */
  98     public final String getName() {
  99         return this.mechanism;
 100     }
 101 
 102     /**
 103      * Returns an <code>ExemptionMechanism</code> object that implements the
 104      * specified exemption mechanism algorithm.
 105      *
 106      * <p> This method traverses the list of registered security Providers,
 107      * starting with the most preferred Provider.
 108      * A new ExemptionMechanism object encapsulating the
 109      * ExemptionMechanismSpi implementation from the first
 110      * Provider that supports the specified algorithm is returned.
 111      *
 112      * <p> Note that the list of registered providers may be retrieved via
 113      * the {@link Security#getProviders() Security.getProviders()} method.
 114      *
 115      * @implNote
 116      * The JDK Reference Implementation additionally uses the
 117      * {@code jdk.security.provider.preferred}
 118      * {@link Security#getProperty(String) Security} property to determine
 119      * the preferred provider order for the specified algorithm. This
 120      * may be different than the order of providers returned by
 121      * {@link Security#getProviders() Security.getProviders()}.
 122      *
 123      * @param algorithm the standard name of the requested exemption
 124      * mechanism.
 125      * See the ExemptionMechanism section in the
 126      * <a href=
 127      *   "{@docRoot}/../technotes/guides/security/StandardNames.html#Exemption">
 128      * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
 129      * for information about standard exemption mechanism names.
 130      *
 131      * @return the new <code>ExemptionMechanism</code> object.
 132      *
 133      * @exception NullPointerException if <code>algorithm</code>
 134      *          is null.
 135      *
 136      * @exception NoSuchAlgorithmException if no Provider supports an
 137      *          ExemptionMechanismSpi implementation for the
 138      *          specified algorithm.


< prev index next >