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

com.github.joekerouac.common.tools.crypto.constant.ECDHKeyPair Maven / Gradle / Ivy

The newest version!
// Generated by delombok at Fri Mar 14 11:41:38 CST 2025
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE
 * file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
 * to You 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
 *
 * http://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 com.github.joekerouac.common.tools.crypto.constant;

/**
 * DH密钥对
 *
 * @since 1.0.0
 * @author JoeKerouac
 * @date 2022-10-14 14:37:00
 */
public class ECDHKeyPair {
    /**
     * 私钥
     */
    private byte[] privateKey;
    /**
     * 公钥
     */
    private byte[] publicKey;

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public ECDHKeyPair() {
    }

    /**
     * 私钥
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public byte[] getPrivateKey() {
        return this.privateKey;
    }

    /**
     * 公钥
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public byte[] getPublicKey() {
        return this.publicKey;
    }

    /**
     * 私钥
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public void setPrivateKey(final byte[] privateKey) {
        this.privateKey = privateKey;
    }

    /**
     * 公钥
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public void setPublicKey(final byte[] publicKey) {
        this.publicKey = publicKey;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public boolean equals(final java.lang.Object o) {
        if (o == this) return true;
        if (!(o instanceof ECDHKeyPair)) return false;
        final ECDHKeyPair other = (ECDHKeyPair) o;
        if (!other.canEqual((java.lang.Object) this)) return false;
        if (!java.util.Arrays.equals(this.getPrivateKey(), other.getPrivateKey())) return false;
        if (!java.util.Arrays.equals(this.getPublicKey(), other.getPublicKey())) return false;
        return true;
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    protected boolean canEqual(final java.lang.Object other) {
        return other instanceof ECDHKeyPair;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        result = result * PRIME + java.util.Arrays.hashCode(this.getPrivateKey());
        result = result * PRIME + java.util.Arrays.hashCode(this.getPublicKey());
        return result;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public java.lang.String toString() {
        return "ECDHKeyPair(privateKey=" + java.util.Arrays.toString(this.getPrivateKey()) + ", publicKey=" + java.util.Arrays.toString(this.getPublicKey()) + ")";
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy