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

com.ionic.sdk.cipher.rsa.model.RsaPrivateKey Maven / Gradle / Ivy

Go to download

The Ionic Java SDK provides an easy-to-use interface to the Ionic Platform.

There is a newer version: 2.9.0
Show newest version
package com.ionic.sdk.cipher.rsa.model;

import java.security.PrivateKey;

/**
 * The Ionic implementation of an RSA private key.  This class wraps the JRE private key implementation.
 */
public final class RsaPrivateKey {

    /**
     * The platform asymmetric private key implementation.
     */
    private PrivateKey privateKey;

    /**
     * Constructor.
     */
    public RsaPrivateKey() {
        this.privateKey = null;
    }

    /**
     * Constructor.
     *
     * @param privateKey the platform private key implementation being wrapped.
     */
    public RsaPrivateKey(final PrivateKey privateKey) {
        this.privateKey = privateKey;
    }

    /**
     * @return the platform private key implementation
     */
    public PrivateKey getPrivateKey() {
        return privateKey;
    }

    /**
     * Set the platform private key implementation.
     *
     * @param privateKey the platform private key implementation
     */
    public void setPrivateKey(final PrivateKey privateKey) {
        this.privateKey = privateKey;
    }

    /**
     * @return true iff the wrapped object is present
     */
    public boolean isLoaded() {
        return (privateKey != null);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy