/** * @deprecated * Build Java private key from base64 encoding. The key should have no password. * * @param base64EncodedKey base64-encoded private key * @return a native Java PrivateKey * @throws KeyException thrown if there is an error constructing key */ public static PrivateKey buildJavaPrivateKey(String base64EncodedKey) throws KeyException { return SecurityHelper.buildJavaPrivateKey(base64EncodedKey); }
/** * @deprecated * Build Java private key from base64 encoding. The key should have no password. * * @param base64EncodedKey base64-encoded private key * @return a native Java PrivateKey * @throws KeyException thrown if there is an error constructing key */ public static PrivateKey buildJavaPrivateKey(String base64EncodedKey) throws KeyException { return SecurityHelper.buildJavaPrivateKey(base64EncodedKey); }
/** * Build Java RSA private key from base64 encoding. * * @param base64EncodedKey base64-encoded RSA private key * @return a native Java RSAPrivateKey * @throws KeyException thrown if there is an error constructing key */ public static RSAPrivateKey buildJavaRSAPrivateKey(String base64EncodedKey) throws KeyException { PrivateKey key = buildJavaPrivateKey(base64EncodedKey); if (! (key instanceof RSAPrivateKey)) { throw new KeyException("Generated key was not an RSAPrivateKey instance"); } return (RSAPrivateKey) key; }
/** * Build Java DSA private key from base64 encoding. * * @param base64EncodedKey base64-encoded DSA private key * @return a native Java DSAPrivateKey * @throws KeyException thrown if there is an error constructing key */ public static DSAPrivateKey buildJavaDSAPrivateKey(String base64EncodedKey) throws KeyException { PrivateKey key = buildJavaPrivateKey(base64EncodedKey); if (! (key instanceof DSAPrivateKey)) { throw new KeyException("Generated key was not a DSAPrivateKey instance"); } return (DSAPrivateKey) key; }
/** * Build Java RSA private key from base64 encoding. * * @param base64EncodedKey base64-encoded RSA private key * @return a native Java RSAPrivateKey * @throws KeyException thrown if there is an error constructing key */ public static RSAPrivateKey buildJavaRSAPrivateKey(String base64EncodedKey) throws KeyException { PrivateKey key = buildJavaPrivateKey(base64EncodedKey); if (! (key instanceof RSAPrivateKey)) { throw new KeyException("Generated key was not an RSAPrivateKey instance"); } return (RSAPrivateKey) key; }
/** * Build Java DSA private key from base64 encoding. * * @param base64EncodedKey base64-encoded DSA private key * @return a native Java DSAPrivateKey * @throws KeyException thrown if there is an error constructing key */ public static DSAPrivateKey buildJavaDSAPrivateKey(String base64EncodedKey) throws KeyException { PrivateKey key = buildJavaPrivateKey(base64EncodedKey); if (! (key instanceof DSAPrivateKey)) { throw new KeyException("Generated key was not a DSAPrivateKey instance"); } return (DSAPrivateKey) key; }
/** * Build Java EC private key from base64 encoding. * * @param base64EncodedKey base64-encoded EC private key * @return a native Java ECPrivateKey * @throws KeyException thrown if there is an error constructing key */ public static ECPrivateKey buildJavaECPrivateKey(String base64EncodedKey) throws KeyException { PrivateKey key = buildJavaPrivateKey(base64EncodedKey); if (! (key instanceof ECPrivateKey)) { throw new KeyException("Generated key was not an ECPrivateKey instance"); } return (ECPrivateKey) key; }
/** * Build Java EC private key from base64 encoding. * * @param base64EncodedKey base64-encoded EC private key * @return a native Java ECPrivateKey * @throws KeyException thrown if there is an error constructing key */ public static ECPrivateKey buildJavaECPrivateKey(String base64EncodedKey) throws KeyException { PrivateKey key = buildJavaPrivateKey(base64EncodedKey); if (! (key instanceof ECPrivateKey)) { throw new KeyException("Generated key was not an ECPrivateKey instance"); } return (ECPrivateKey) key; }