package com.atlassian.bitbucket.internal.mirroring.ssh.encoding;

import javax.annotation.Nonnull;
import java.io.File;
import java.security.PrivateKey;

/**
 * Encodes and decodes a private key in an implementation-specific format to / from a file
 */
public interface PrivateKeyPemHelper {

    /**
     * @throws KeyCodecException if encoding failed
     */
    void write(@Nonnull PrivateKey privateKey, @Nonnull File keyFile);
}
