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

org.erwinkok.libp2p.security.noise.Noise.kt Maven / Gradle / Ivy

The newest version!
// Copyright (c) 2023 Erwin Kok. BSD-3-Clause license. See LICENSE file for more details.
package org.erwinkok.libp2p.security.noise

import org.erwinkok.libp2p.core.host.builder.HostDsl
import org.erwinkok.libp2p.core.host.builder.SecurityTransportBuilder

@HostDsl
fun SecurityTransportBuilder.noise() {
    if (config.insecure) {
        errors.recordError { "cannot configure security transports with an insecure configuration" }
    } else {
        config.securityTransportFactories.add(NoiseTransport)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy