Class BaseAgreementSpi

    • Field Detail

      • kaAlgorithm

        protected final java.lang.String kaAlgorithm
      • ukmParameters

        protected byte[] ukmParameters
    • Constructor Detail

      • BaseAgreementSpi

        public BaseAgreementSpi​(java.lang.String kaAlgorithm,
                                DerivationFunction kdf)
    • Method Detail

      • getAlgorithm

        protected static java.lang.String getAlgorithm​(java.lang.String algDetails)
      • getKeySize

        protected static int getKeySize​(java.lang.String algDetails)
      • trimZeroes

        protected static byte[] trimZeroes​(byte[] secret)
      • engineGenerateSecret

        protected byte[] engineGenerateSecret()
                                       throws java.lang.IllegalStateException
        Specified by:
        engineGenerateSecret in class javax.crypto.KeyAgreementSpi
        Throws:
        java.lang.IllegalStateException
      • engineGenerateSecret

        protected int engineGenerateSecret​(byte[] sharedSecret,
                                           int offset)
                                    throws java.lang.IllegalStateException,
                                           javax.crypto.ShortBufferException
        Specified by:
        engineGenerateSecret in class javax.crypto.KeyAgreementSpi
        Throws:
        java.lang.IllegalStateException
        javax.crypto.ShortBufferException
      • engineGenerateSecret

        protected javax.crypto.SecretKey engineGenerateSecret​(java.lang.String algorithm)
                                                       throws java.security.NoSuchAlgorithmException
        Specified by:
        engineGenerateSecret in class javax.crypto.KeyAgreementSpi
        Throws:
        java.security.NoSuchAlgorithmException
      • calcSecret

        protected abstract byte[] calcSecret()