diff options
author | (no author) <(no author)@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-15 15:25:50 +0000 |
---|---|---|
committer | (no author) <(no author)@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-15 15:25:50 +0000 |
commit | 070273bdc9fb305967efb07d3e0f876e9165c834 (patch) | |
tree | 56b72390678446b2978e704e3652c92ae4eea95f /libjava/java/security/KeyPairGenerator.java | |
parent | eec2bdfb328d15e3441cf215ad51c83c9e3ca0ef (diff) |
This commit was manufactured by cvs2svn to create tagbounded-pointers-merge-20000718
'bounded-pointers-merge-20000718'.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/tags/bounded-pointers-merge-20000718@35710 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/security/KeyPairGenerator.java')
-rw-r--r-- | libjava/java/security/KeyPairGenerator.java | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/libjava/java/security/KeyPairGenerator.java b/libjava/java/security/KeyPairGenerator.java deleted file mode 100644 index 7954c3270ac..00000000000 --- a/libjava/java/security/KeyPairGenerator.java +++ /dev/null @@ -1,86 +0,0 @@ -/* Copyright (C) 2000 Free Software Foundation - - This file is part of libgcj. - -This software is copyrighted work licensed under the terms of the -Libgcj License. Please consult the file "LIBGCJ_LICENSE" for -details. */ - -package java.security; - -/** - * @author Warren Levy <warrenl@cygnus.com> - * @date February 10, 2000. - */ - -/** - * Written using on-line Java Platform 1.2 API Specification. - * Status: Partially implemented to the 1.1 spec. - * It is known not to comply with the 1.2 spec. - */ - -public abstract class KeyPairGenerator extends KeyPairGeneratorSpi -{ - protected KeyPairGenerator(String algorithm) - { - name = algorithm; - } - - public static KeyPairGenerator getInstance(String algorithm) - throws NoSuchAlgorithmException - { - String name = "KeyPairGenerator." + algorithm; - Provider[] provs = Security.getProviders(); - for (int i = 0; i < provs.length; ++i) - { - String val = provs[i].getProperty(name); - if (val != null) - { - try - { - return (KeyPairGenerator) Class.forName(val).newInstance(); - } - catch (Throwable _) - { - // We just ignore failures. - } - } - } - - throw new NoSuchAlgorithmException(algorithm); - } - - public static KeyPairGenerator getInstance(String algorithm, String provider) - throws NoSuchAlgorithmException, NoSuchProviderException - { - String name = "KeyPairGenerator." + algorithm; - Provider p = Security.getProvider(provider); - if (p == null) - throw new NoSuchProviderException(provider); - String val = p.getProperty(name); - if (val != null) - { - try - { - return (KeyPairGenerator) Class.forName(val).newInstance(); - } - catch (Throwable _) - { - // Nothing. - } - } - - throw new NoSuchAlgorithmException(algorithm); - } - - public String getAlgorithm() - { - return name; - } - - public abstract void initialize(int strength, SecureRandom random); - public abstract KeyPair generateKeyPair(); - - // Algorithm name. - private String name; -} |