Top Fields Constructors Methods
org.bouncycastle.openssl.jcajce

pack-priv Class PEMUtilities

extends Object
Class Inheritance
Imports
java.security.GeneralSecurityException, .Key, .NoSuchAlgorithmException, .NoSuchProviderException, java.security.spec.AlgorithmParameterSpec, .InvalidKeySpecException, java.util.HashMap, .HashSet, .Map, .Set, javax.crypto.Cipher, .SecretKey, .SecretKeyFactory, javax.crypto.spec.IvParameterSpec, .PBEKeySpec, .RC2ParameterSpec, .SecretKeySpec, org.bouncycastle.asn1.ASN1ObjectIdentifier, org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers, org.bouncycastle.asn1.nist.NISTObjectIdentifiers, org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers, org.bouncycastle.asn1.x509.AlgorithmIdentifier, org.bouncycastle.jcajce.util.JcaJceHelper, org.bouncycastle.openssl.EncryptionException, .PEMException, org.bouncycastle.util.Integers

Field Summary

Modifier and TypeField and Description
private static final Map<K, V>
pack-priv static final ASN1ObjectIdentifier
pack-priv static final ASN1ObjectIdentifier
id_hmacWithSHA3_256

2.16.840.1.101.3.4.2.14

pack-priv static final ASN1ObjectIdentifier
id_hmacWithSHA3_384

2.16.840.1.101.3.4.2.15

pack-priv static final ASN1ObjectIdentifier
id_hmacWithSHA3_512

2.16.840.1.101.3.4.2.16

private static final Map<K, V>
private static final Map<K, V>
private static final Set<E>
private static final Set<E>
private static final Map<K, V>
private static final Map<K, V>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv static byte[]
crypt(boolean encrypt, JcaJceHelper helper, byte[] bytes, char[] password, String dekAlgName, byte[] iv)

public static SecretKey
generateSecretKeyForPKCS5Scheme2(JcaJceHelper helper, String algorithm, char[] password, byte[] salt, int iterationCount)

public static SecretKey
generateSecretKeyForPKCS5Scheme2(JcaJceHelper helper, String algorithm, char[] password, byte[] salt, int iterationCount, AlgorithmIdentifier prf)

pack-priv static String
pack-priv static String
private static SecretKey
getKey(JcaJceHelper helper, char[] password, String algorithm, int keyLength, byte[] salt)

private static SecretKey
getKey(JcaJceHelper helper, char[] password, String algorithm, int keyLength, byte[] salt, boolean des2)

pack-priv static int
getKeySize(String algorithm)

pack-priv static int
pack-priv static boolean
public static boolean
pack-priv static boolean
pack-priv static boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CIPHER_NAMESback to summary
private static final Map<K, V> CIPHER_NAMES
id_hmacWithSHA3_224back to summary
pack-priv static final ASN1ObjectIdentifier id_hmacWithSHA3_224
id_hmacWithSHA3_256back to summary
pack-priv static final ASN1ObjectIdentifier id_hmacWithSHA3_256

2.16.840.1.101.3.4.2.14

id_hmacWithSHA3_384back to summary
pack-priv static final ASN1ObjectIdentifier id_hmacWithSHA3_384

2.16.840.1.101.3.4.2.15

id_hmacWithSHA3_512back to summary
pack-priv static final ASN1ObjectIdentifier id_hmacWithSHA3_512

2.16.840.1.101.3.4.2.16

KEY_NAMESback to summary
private static final Map<K, V> KEY_NAMES
KEYSIZESback to summary
private static final Map<K, V> KEYSIZES
PKCS5_SCHEME_1back to summary
private static final Set<E> PKCS5_SCHEME_1
PKCS5_SCHEME_2back to summary
private static final Set<E> PKCS5_SCHEME_2
PRFSback to summary
private static final Map<K, V> PRFS
PRFS_SALTback to summary
private static final Map<K, V> PRFS_SALT

Constructor Detail

PEMUtilitiesback to summary
pack-priv PEMUtilities()

Method Detail

cryptback to summary
pack-priv static byte[] crypt(boolean encrypt, JcaJceHelper helper, byte[] bytes, char[] password, String dekAlgName, byte[] iv) throws PEMException
generateSecretKeyForPKCS5Scheme2back to summary
public static SecretKey generateSecretKeyForPKCS5Scheme2(JcaJceHelper helper, String algorithm, char[] password, byte[] salt, int iterationCount) throws NoSuchProviderException, NoSuchAlgorithmException, InvalidKeySpecException
generateSecretKeyForPKCS5Scheme2back to summary
public static SecretKey generateSecretKeyForPKCS5Scheme2(JcaJceHelper helper, String algorithm, char[] password, byte[] salt, int iterationCount, AlgorithmIdentifier prf) throws NoSuchProviderException, NoSuchAlgorithmException, InvalidKeySpecException
getAlgorithmNameback to summary
pack-priv static String getAlgorithmName(String oid)
getCipherNameback to summary
pack-priv static String getCipherName(ASN1ObjectIdentifier oid)
getKeyback to summary
private static SecretKey getKey(JcaJceHelper helper, char[] password, String algorithm, int keyLength, byte[] salt) throws PEMException
getKeyback to summary
private static SecretKey getKey(JcaJceHelper helper, char[] password, String algorithm, int keyLength, byte[] salt, boolean des2) throws PEMException
getKeySizeback to summary
pack-priv static int getKeySize(String algorithm)
getSaltSizeback to summary
pack-priv static int getSaltSize(ASN1ObjectIdentifier algorithm)
isHmacSHA1back to summary
pack-priv static boolean isHmacSHA1(AlgorithmIdentifier prf)
isPKCS12back to summary
public static boolean isPKCS12(ASN1ObjectIdentifier algOid)
isPKCS5Scheme1back to summary
pack-priv static boolean isPKCS5Scheme1(ASN1ObjectIdentifier algOid)
isPKCS5Scheme2back to summary
pack-priv static boolean isPKCS5Scheme2(ASN1ObjectIdentifier algOid)