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

org.bouncycastle.pqc.crypto.ntru.NTRUPrivateKeyParameters Maven / Gradle / Ivy

Go to download

The Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms. This jar contains JCE provider and lightweight API for the Bouncy Castle Cryptography APIs for JDK 1.4. Note: this package includes the NTRU encryption algorithms.

There is a newer version: 1.74
Show newest version
package org.bouncycastle.pqc.crypto.ntru;

import org.bouncycastle.util.Arrays;

/**
 * NTRU private key parameter class.
 */
public class NTRUPrivateKeyParameters
    extends NTRUKeyParameters
{
    final byte[] privateKey;

    public NTRUPrivateKeyParameters(NTRUParameters params, byte[] key)
    {
        super(true, params);
        this.privateKey = Arrays.clone(key);
    }

    /**
     * Get private key.
     *
     * @return a byte array containing private key
     */
    public byte[] getPrivateKey()
    {
        return Arrays.clone(this.privateKey);
    }

    /**
     * Get the encoding of the private key.
     *
     * @return a byte array containing private key
     */
    public byte[] getEncoded()
    {
        return getPrivateKey();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy