Skip to content
Snippets Groups Projects
Select Git revision
  • 0a7ea4849d6749538ae2bf2c1934277b5f167635
  • master default protected
  • 4
  • 4.13
  • 4.13.0
  • 4.12.3
  • 4.12.2
  • 4.12.1
  • 4.12
  • 4.12.0
  • 4.11
  • 4.11.1
  • 4.11.0
  • 4.10
  • 4.10.0
  • 4.9
  • 4.9.1
  • 4.9.2
  • 4.9.0
19 results

CHANGELOG.md

Blame
  • To find the state of this project's repository at the time of any of these versions, check out the tags.
    KeyAgreement.mark 2.36 KiB
    // SPDX-License-Identifier: Apache-2.0
    
    /*
     * Copyright (c) 2020-2023, Fraunhofer AISEC. All rights reserved.
     *
     * Licensed under the Apache License, Version 2.0 (the "License");
     * you may not use this file except in compliance with the License.
     * You may obtain a copy of the License at
     *
     *      https://www.apache.org/licenses/LICENSE-2.0
     *
     * Unless required by applicable law or agreed to in writing, software
     * distributed under the License is distributed on an "AS IS" BASIS,
     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     * See the License for the specific language governing permissions and
     * limitations under the License.
     *
     *     _____          _
     *    / ____|        | |
     *   | |     ___   __| |_   _ _______
     *   | |    / _ \ / _` | | | |_  / _ \
     *   | |___| (_) | (_| | |_| |/ /  __/
     *    \_____\___/ \__,_|\__, /___\___|
     *                      __/ |
     *                     |___/
     */
    package java.jca
    
    entity KeyAgreement {
        
        var algorithm;
        var provider;
        
        var key;
        var random;
        var params;
        
        op instantiate {
            javax.crypto.KeyAgreement.getInstance(
                algorithm : java.lang.String
            );
            javax.crypto.KeyAgreement.getInstance(
                algorithm : java.lang.String,
                provider : java.lang.String | java.security.Provider
            );
        }
        
        op initialize {
            javax.crypto.KeyAgreement.init(
                key : java.security.Key
            );
            javax.crypto.KeyAgreement.init(
                key : java.security.Key,
                random : java.security.SecureRandom
            );
            javax.crypto.KeyAgreement.init(
                key : java.security.Key,
                params : java.security.spec.AlgorithmParameterSpec
            );
            javax.crypto.KeyAgreement.init(
                key : java.security.Key,
                params : java.security.spec.AlgorithmParameterSpec,
                random : java.security.SecureRandom
            );
        }
        
        op doPhase {
            javax.crypto.KeyAgreement.doPhase(
                key : java.security.Key,
                lastPhase : boolean
            );
        }
        
        op generate {
            javax.crypto.KeyAgreement.generateSecret();
            javax.crypto.KeyAgreement.generateSecret(
                sharedSecret : byte[],
                _
            );
            javax.crypto.KeyAgreement.generateSecret(
                algorithm : java.lang.String
            );
        }
    }