当前位置: 首页>>代码示例>>Java>>正文


Java AlgorithmParameters.toString方法代码示例

本文整理汇总了Java中java.security.AlgorithmParameters.toString方法的典型用法代码示例。如果您正苦于以下问题:Java AlgorithmParameters.toString方法的具体用法?Java AlgorithmParameters.toString怎么用?Java AlgorithmParameters.toString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.security.AlgorithmParameters的用法示例。


在下文中一共展示了AlgorithmParameters.toString方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: engineInit

import java.security.AlgorithmParameters; //导入方法依赖的package包/类
protected void engineInit(
    int                 opmode,
    Key                 key,
    AlgorithmParameters params,
    SecureRandom        random) 
throws InvalidKeyException, InvalidAlgorithmParameterException
{
    AlgorithmParameterSpec  paramSpec = null;

    if (params != null)
    {
        for (int i = 0; i != availableSpecs.length; i++)
        {
            try
            {
                paramSpec = params.getParameterSpec(availableSpecs[i]);
                break;
            }
            catch (Exception e)
            {
                // try again if possible
            }
        }

        if (paramSpec == null)
        {
            throw new InvalidAlgorithmParameterException("can't handle parameter " + params.toString());
        }
    }

    engineInit(opmode, key, paramSpec, random);
    
    engineParams = params;
}
 
开发者ID:PhilippC,项目名称:keepass2android,代码行数:35,代码来源:JCEBlockCipher.java

示例2: engineInit

import java.security.AlgorithmParameters; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
protected void engineInit(
       int                 opmode,
       Key                 key,
       AlgorithmParameters params,
       SecureRandom        random)
   throws InvalidKeyException, InvalidAlgorithmParameterException
   {
       AlgorithmParameterSpec  paramSpec = null;

       if (params != null)
       {
           for (int i = 0; i != availableSpecs.length; i++)
           {
               try
               {
                   paramSpec = params.getParameterSpec(availableSpecs[i]);
                   break;
               }
               catch (Exception e)
               {
                   // try next spec
               }
           }

           if (paramSpec == null)
           {
               throw new InvalidAlgorithmParameterException("can't handle parameter " + params.toString());
           }
       }

       engineParams = params;
       engineInit(opmode, key, paramSpec, random);
   }
 
开发者ID:PhilippC,项目名称:keepass2android,代码行数:35,代码来源:WrapCipherSpi.java

示例3: engineInit

import java.security.AlgorithmParameters; //导入方法依赖的package包/类
protected void engineInit(
    int                 opmode,
    Key                 key,
    AlgorithmParameters params,
    SecureRandom        random) 
    throws InvalidKeyException, InvalidAlgorithmParameterException
{
    AlgorithmParameterSpec  paramSpec = null;

    if (params != null)
    {
        for (int i = 0; i != availableSpecs.length; i++)
        {
            try
            {
                paramSpec = params.getParameterSpec(availableSpecs[i]);
                break;
            }
            catch (Exception e)
            {
                continue;
            }
        }

        if (paramSpec == null)
        {
            throw new InvalidAlgorithmParameterException("can't handle parameter " + params.toString());
        }
    }

    engineInit(opmode, key, paramSpec, random);
    engineParams = params;
}
 
开发者ID:PhilippC,项目名称:keepass2android,代码行数:34,代码来源:JCEStreamCipher.java

示例4: engineInit

import java.security.AlgorithmParameters; //导入方法依赖的package包/类
protected void engineInit(
    int                 opmode,
    Key                 key,
    AlgorithmParameters params,
    SecureRandom        random) 
throws InvalidKeyException, InvalidAlgorithmParameterException
{
    AlgorithmParameterSpec  paramSpec = null;

    if (params != null)
    {
        for (int i = 0; i != availableSpecs.length; i++)
        {
            try
            {
                paramSpec = params.getParameterSpec(availableSpecs[i]);
                break;
            }
            catch (Exception e)
            {
                continue;
            }
        }

        if (paramSpec == null)
        {
            throw new InvalidAlgorithmParameterException("can't handle parameter " + params.toString());
        }
    }

    engineParams = params;
    engineInit(opmode, key, paramSpec, random);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:34,代码来源:BrokenJCEBlockCipher.java

示例5: engineInit

import java.security.AlgorithmParameters; //导入方法依赖的package包/类
protected void engineInit(
    int                 opmode,
    Key                 key,
    AlgorithmParameters params,
    SecureRandom        random)
throws InvalidKeyException, InvalidAlgorithmParameterException
{
    AlgorithmParameterSpec  paramSpec = null;

    if (params != null)
    {
        for (int i = 0; i != availableSpecs.length; i++)
        {
            try
            {
                paramSpec = params.getParameterSpec(availableSpecs[i]);
                break;
            }
            catch (Exception e)
            {
                // try next spec
            }
        }

        if (paramSpec == null)
        {
            throw new InvalidAlgorithmParameterException("can't handle parameter " + params.toString());
        }
    }

    engineParams = params;
    engineInit(opmode, key, paramSpec, random);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:34,代码来源:BaseWrapCipher.java

示例6: engineInit

import java.security.AlgorithmParameters; //导入方法依赖的package包/类
protected void engineInit(
    int                 opmode,
    Key                 key,
    AlgorithmParameters params,
    SecureRandom        random) 
throws InvalidKeyException, InvalidAlgorithmParameterException
{
    AlgorithmParameterSpec  paramSpec = null;

    if (params != null)
    {
        for (int i = 0; i != availableSpecs.length; i++)
        {
            try
            {
                paramSpec = params.getParameterSpec(availableSpecs[i]);
                break;
            }
            catch (Exception e)
            {
                continue;
            }
        }

        if (paramSpec == null)
        {
            throw new InvalidAlgorithmParameterException("can't handle parameter " + params.toString());
        }
    }

    engineParam = params;
    engineInit(opmode, key, paramSpec, random);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:34,代码来源:CipherSpi.java

示例7: mapPBEParamsToAlgorithm

import java.security.AlgorithmParameters; //导入方法依赖的package包/类
private static String mapPBEParamsToAlgorithm(ObjectIdentifier algorithm,
    AlgorithmParameters algParams) throws NoSuchAlgorithmException {
    // Check for PBES2 algorithms
    if (algorithm.equals((Object)pbes2_OID) && algParams != null) {
        return algParams.toString();
    }
    return algorithm.toString();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:PKCS12KeyStore.java

示例8: mapPBEParamsToAlgorithm

import java.security.AlgorithmParameters; //导入方法依赖的package包/类
private static String mapPBEParamsToAlgorithm(ObjectIdentifier algorithm,
    AlgorithmParameters algParams) throws NoSuchAlgorithmException {
    // Check for PBES2 algorithms
    if (algorithm.equals(pbes2_OID) && algParams != null) {
        return algParams.toString();
    }
    return algorithm.toString();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:9,代码来源:PKCS12KeyStore.java


注:本文中的java.security.AlgorithmParameters.toString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。