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

com.ionic.sdk.cipher.rsa.model.RsaPublicKey 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.PublicKey;

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

    /**
     * The platform asymmetric public key implementation.
     */
    private PublicKey publicKey;

    /**
     * Constructor.
     */
    public RsaPublicKey() {
        this.publicKey = null;
    }

    /**
     * Constructor.
     *
     * @param publicKey the platform public key implementation being wrapped.
     */
    public RsaPublicKey(final PublicKey publicKey) {
        this.publicKey = publicKey;
    }

    /**
     * @return the platform public key implementation
     */
    public PublicKey getPublicKey() {
        return publicKey;
    }

    /**
     * Set the platform public key implementation.
     *
     * @param publicKey the platform public key implementation
     */
    public void setPublicKey(final PublicKey publicKey) {
        this.publicKey = publicKey;
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy