javax.crypto.Mac#getProvider ( )源码实例Demo

下面列出了javax.crypto.Mac#getProvider ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

/**
 * Returns an <code>HmacKeyDerivationFunction</code> object using the specified algorithm.
 *
 * @param algorithm the standard name of the requested MAC algorithm. See the Mac
 *                  section in the <a href=
 *                  "http://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html#Mac"
 *                  > Java Cryptography Architecture Standard Algorithm Name
 *                  Documentation</a> for information about standard algorithm
 *                  names.
 * @return the new <code>Hkdf</code> object
 * @throws NoSuchAlgorithmException if no Provider supports a MacSpi implementation for the
 *                                  specified algorithm.
 */
public static HmacKeyDerivationFunction getInstance(final String algorithm)
        throws NoSuchAlgorithmException {
    // Constructed specifically to sanity-test arguments.
    Mac mac = Mac.getInstance(algorithm);
    return new HmacKeyDerivationFunction(algorithm, mac.getProvider());
}
 
源代码2 项目: aws-dynamodb-encryption-java   文件: Hkdf.java
/**
 * Returns an <code>Hkdf</code> object using the specified algorithm.
 *
 * @param algorithm
 *            the standard name of the requested MAC algorithm. See the Mac
 *            section in the <a href=
 *            "http://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html#Mac"
 *            > Java Cryptography Architecture Standard Algorithm Name
 *            Documentation</a> for information about standard algorithm
 *            names.
 * @return the new <code>Hkdf</code> object
 * @throws NoSuchAlgorithmException
 *             if no Provider supports a MacSpi implementation for the
 *             specified algorithm.
 */
public static Hkdf getInstance(final String algorithm)
        throws NoSuchAlgorithmException {
    // Constructed specifically to sanity-test arguments.
    Mac mac = Mac.getInstance(algorithm);
    return new Hkdf(algorithm, mac.getProvider());
}
 
源代码3 项目: aws-dynamodb-encryption-java   文件: Hkdf.java
/**
 * Returns an <code>Hkdf</code> object using the specified algorithm.
 *
 * @param algorithm
 *            the standard name of the requested MAC algorithm. See the Mac
 *            section in the <a href=
 *            "http://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html#Mac"
 *            > Java Cryptography Architecture Standard Algorithm Name
 *            Documentation</a> for information about standard algorithm
 *            names.
 * @param provider
 *            the name of the provider
 * @return the new <code>Hkdf</code> object
 * @throws NoSuchAlgorithmException
 *             if a MacSpi implementation for the specified algorithm is not
 *             available from the specified provider.
 * @throws NoSuchProviderException
 *             if the specified provider is not registered in the security
 *             provider list.
 */
public static Hkdf getInstance(final String algorithm, final String provider)
        throws NoSuchAlgorithmException, NoSuchProviderException {
    // Constructed specifically to sanity-test arguments.
    Mac mac = Mac.getInstance(algorithm, provider);
    return new Hkdf(algorithm, mac.getProvider());
}
 
源代码4 项目: aws-dynamodb-encryption-java   文件: Hkdf.java
/**
 * Returns an <code>Hkdf</code> object using the specified algorithm.
 *
 * @param algorithm
 *            the standard name of the requested MAC algorithm. See the Mac
 *            section in the <a href=
 *            "http://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html#Mac"
 *            > Java Cryptography Architecture Standard Algorithm Name
 *            Documentation</a> for information about standard algorithm
 *            names.
 * @param provider
 *            the provider
 * @return the new <code>Hkdf</code> object
 * @throws NoSuchAlgorithmException
 *             if a MacSpi implementation for the specified algorithm is not
 *             available from the specified provider.
 */
public static Hkdf getInstance(final String algorithm,
        final Provider provider) throws NoSuchAlgorithmException {
    // Constructed specifically to sanity-test arguments.
    Mac mac = Mac.getInstance(algorithm, provider);
    return new Hkdf(algorithm, mac.getProvider());
}
 
源代码5 项目: aws-dynamodb-encryption-java   文件: Hkdf.java
/**
 * Returns an <code>Hkdf</code> object using the specified algorithm.
 *
 * @param algorithm
 *            the standard name of the requested MAC algorithm. See the Mac
 *            section in the <a href=
 *            "http://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html#Mac"
 *            > Java Cryptography Architecture Standard Algorithm Name
 *            Documentation</a> for information about standard algorithm
 *            names.
 * @return the new <code>Hkdf</code> object
 * @throws NoSuchAlgorithmException
 *             if no Provider supports a MacSpi implementation for the
 *             specified algorithm.
 */
public static Hkdf getInstance(final String algorithm)
        throws NoSuchAlgorithmException {
    // Constructed specifically to sanity-test arguments.
    Mac mac = Mac.getInstance(algorithm);
    return new Hkdf(algorithm, mac.getProvider());
}
 
源代码6 项目: aws-dynamodb-encryption-java   文件: Hkdf.java
/**
 * Returns an <code>Hkdf</code> object using the specified algorithm.
 *
 * @param algorithm
 *            the standard name of the requested MAC algorithm. See the Mac
 *            section in the <a href=
 *            "http://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html#Mac"
 *            > Java Cryptography Architecture Standard Algorithm Name
 *            Documentation</a> for information about standard algorithm
 *            names.
 * @param provider
 *            the name of the provider
 * @return the new <code>Hkdf</code> object
 * @throws NoSuchAlgorithmException
 *             if a MacSpi implementation for the specified algorithm is not
 *             available from the specified provider.
 * @throws NoSuchProviderException
 *             if the specified provider is not registered in the security
 *             provider list.
 */
public static Hkdf getInstance(final String algorithm, final String provider)
        throws NoSuchAlgorithmException, NoSuchProviderException {
    // Constructed specifically to sanity-test arguments.
    Mac mac = Mac.getInstance(algorithm, provider);
    return new Hkdf(algorithm, mac.getProvider());
}
 
源代码7 项目: aws-dynamodb-encryption-java   文件: Hkdf.java
/**
 * Returns an <code>Hkdf</code> object using the specified algorithm.
 *
 * @param algorithm
 *            the standard name of the requested MAC algorithm. See the Mac
 *            section in the <a href=
 *            "http://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html#Mac"
 *            > Java Cryptography Architecture Standard Algorithm Name
 *            Documentation</a> for information about standard algorithm
 *            names.
 * @param provider
 *            the provider
 * @return the new <code>Hkdf</code> object
 * @throws NoSuchAlgorithmException
 *             if a MacSpi implementation for the specified algorithm is not
 *             available from the specified provider.
 */
public static Hkdf getInstance(final String algorithm,
        final Provider provider) throws NoSuchAlgorithmException {
    // Constructed specifically to sanity-test arguments.
    Mac mac = Mac.getInstance(algorithm, provider);
    return new Hkdf(algorithm, mac.getProvider());
}