001package com.box.sdk;
002
003import java.security.PrivateKey;
004
005/**
006 * Implement this interface to provide a custom private key decryptor. If you require the decryption
007 * operation to be FIPS compliant, ensure that your implementation exclusively utilizes FIPS
008 * certified libraries.
009 */
010public interface IPrivateKeyDecryptor {
011
012  /**
013   * Decrypts private key with provided passphrase using Bouncy Castle library
014   *
015   * @param encryptedPrivateKey Encoded private key string.
016   * @param passphrase Private key passphrase.
017   * @return java.security.PrivateKey instance representing decrypted private key.
018   */
019  PrivateKey decryptPrivateKey(String encryptedPrivateKey, String passphrase);
020}