All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bouncycastle.jcajce.spec.IESKEMParameterSpec Maven / Gradle / Ivy

Go to download

The Long Term Stable (LTS) Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms. This jar contains the JCA/JCE provider and low-level API for the BC LTS version 2.73.7 for Java 8 and later.

There is a newer version: 2.73.7
Show newest version
package org.bouncycastle.jcajce.spec;

import java.security.spec.AlgorithmParameterSpec;

import org.bouncycastle.util.Arrays;

/**
 * Parameter spec for an integrated encryptor KEM, as in IEEE_Std_1609_2
 */
public class IESKEMParameterSpec
    implements AlgorithmParameterSpec
{
    private final byte[] recipientInfo;
    private final boolean usePointCompression;


    /**
     * Set the IESKEM parameters.
     *
     * @param recipientInfo recipient data.
     */
    public IESKEMParameterSpec(
        byte[] recipientInfo)
    {
        this(recipientInfo, false);
    }

    /**
     * Set the IESKEM parameters - specifying point compression.
     *
     * @param recipientInfo recipient data.
     * @param usePointCompression use point compression on output (ignored on input).
     */
    public IESKEMParameterSpec(
        byte[] recipientInfo,
        boolean usePointCompression)
    {
        this.recipientInfo = Arrays.clone(recipientInfo);
        this.usePointCompression = usePointCompression;
    }

    public byte[] getRecipientInfo()
    {
        return Arrays.clone(recipientInfo);
    }

    public boolean hasUsePointCompression()
    {
        return usePointCompression;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy