Creates a new {@code KeyAgreementSpi} instance.sinceAndroid 1.0
Does the next (or the last) phase of the key agreement, using the specified key.paramkey the key received from the other party for this phase.paramlastPhase set to {@code true} if this is the last phase of this key agreement.returnthe intermediate key from this phase or null if there is no intermediate key for this phase.throwsInvalidKeyException if the specified key cannot be used in this key agreement or this phase,throwsIllegalStateException if this instance has not been initialized.sinceAndroid 1.0
Generates the shared secret.returnthe generated shared secret.throwsIllegalStateException if this key agreement is not complete.sinceAndroid 1.0
Generates the shared secret and stores it into the buffer {@code sharedSecred} at {@code offset}.paramsharedSecret the buffer to store the shared secret.paramoffset the offset in the buffer.returnthe number of bytes stored in the buffer.throwsIllegalStateException if this key agreement is not complete.throwsShortBufferException if the specified buffer is too small for the shared secret.sinceAndroid 1.0
Generates the shared secret.paramalgorithm the algorithm to for the {@code SecretKey}returnthe shared secret as a {@code SecretKey} of the specified algorithm.throwsIllegalStateException if this key agreement is not complete.throwsNoSuchAlgorithmException if the specified algorithm for the secret key does not exists.throwsInvalidKeyException if a {@code SecretKey} with the specified algorithm cannot be created using the generated shared secret.sinceAndroid 1.0
Initializes this {@code KeyAgreementSpi} with the specified key and the specified randomness source.paramkey the key to initialize this key agreement.paramrandom the source for any randomness needed.throwsInvalidKeyException if the specified key cannot be used to initialize this key agreement.sinceAndroid 1.0
Initializes this {@code KeyAgreementSpi} with the specified key, algorithm parameters and randomness source.paramkey the key to initialize this key agreement.paramparams the parameters for this key agreement algorithm.paramrandom the source for any randomness needed.throwsInvalidKeyException if the specified key cannot be used to initialize this key agreement.throwsInvalidAlgorithmParameterException if the specified parameters are invalid for this key agreement algorithm.sinceAndroid 1.0