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

org.pgpainless.sop.ListProfilesImpl.kt Maven / Gradle / Ivy

The newest version!
// SPDX-FileCopyrightText: 2024 Paul Schaub 
//
// SPDX-License-Identifier: Apache-2.0

package org.pgpainless.sop

import sop.Profile
import sop.exception.SOPGPException
import sop.operation.ListProfiles

/** Implementation of the `list-profiles` operation using PGPainless. */
class ListProfilesImpl : ListProfiles {

    override fun subcommand(command: String): List =
        when (command) {
            "generate-key" -> GenerateKeyImpl.SUPPORTED_PROFILES
            "encrypt" -> EncryptImpl.SUPPORTED_PROFILES
            else -> throw SOPGPException.UnsupportedProfile(command)
        }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy