當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。