src/share/classes/java/security/KeyFactorySpi.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 28,55 ****
import java.security.spec.KeySpec;
import java.security.spec.InvalidKeySpecException;
/**
* This class defines the <i>Service Provider Interface</i> (<b>SPI</b>)
! * for the <code>KeyFactory</code> class.
* All the abstract methods in this class must be implemented by each
* cryptographic service provider who wishes to supply the implementation
* of a key factory for a particular algorithm.
*
* <P> Key factories are used to convert <I>keys</I> (opaque
! * cryptographic keys of type <code>Key</code>) into <I>key specifications</I>
* (transparent representations of the underlying key material), and vice
* versa.
*
* <P> Key factories are bi-directional. That is, they allow you to build an
* opaque key object from a given key specification (key material), or to
* retrieve the underlying key material of a key object in a suitable format.
*
* <P> Multiple compatible key specifications may exist for the same key.
* For example, a DSA public key may be specified using
! * <code>DSAPublicKeySpec</code> or
! * <code>X509EncodedKeySpec</code>. A key factory can be used to translate
* between compatible key specifications.
*
* <P> A provider should document all the key specifications supported by its
* key factory.
*
--- 28,55 ----
import java.security.spec.KeySpec;
import java.security.spec.InvalidKeySpecException;
/**
* This class defines the <i>Service Provider Interface</i> (<b>SPI</b>)
! * for the {@code KeyFactory} class.
* All the abstract methods in this class must be implemented by each
* cryptographic service provider who wishes to supply the implementation
* of a key factory for a particular algorithm.
*
* <P> Key factories are used to convert <I>keys</I> (opaque
! * cryptographic keys of type {@code Key}) into <I>key specifications</I>
* (transparent representations of the underlying key material), and vice
* versa.
*
* <P> Key factories are bi-directional. That is, they allow you to build an
* opaque key object from a given key specification (key material), or to
* retrieve the underlying key material of a key object in a suitable format.
*
* <P> Multiple compatible key specifications may exist for the same key.
* For example, a DSA public key may be specified using
! * {@code DSAPublicKeySpec} or
! * {@code X509EncodedKeySpec}. A key factory can be used to translate
* between compatible key specifications.
*
* <P> A provider should document all the key specifications supported by its
* key factory.
*
*** 98,112 ****
throws InvalidKeySpecException;
/**
* Returns a specification (key material) of the given key
* object.
! * <code>keySpec</code> identifies the specification class in which
* the key material should be returned. It could, for example, be
! * <code>DSAPublicKeySpec.class</code>, to indicate that the
* key material should be returned in an instance of the
! * <code>DSAPublicKeySpec</code> class.
*
* @param key the key.
*
* @param keySpec the specification class in which
* the key material should be returned.
--- 98,112 ----
throws InvalidKeySpecException;
/**
* Returns a specification (key material) of the given key
* object.
! * {@code keySpec} identifies the specification class in which
* the key material should be returned. It could, for example, be
! * {@code DSAPublicKeySpec.class}, to indicate that the
* key material should be returned in an instance of the
! * {@code DSAPublicKeySpec} class.
*
* @param key the key.
*
* @param keySpec the specification class in which
* the key material should be returned.