code: public PrivateKey getPrivateKeyFromString(String key) throws MangooEncryptionException {
          Objects.requireNonNull(key, Required.KEY.toString());
          
          try {
              return KeyFactory.getInstance(ALGORITHM).generatePrivate(new PKCS8EncodedKeySpec(decodeBase64(key)));
          } catch (InvalidKeySpecException | NoSuchAlgorithmException e) {
              throw new MangooEncryptionException("Failed to get private key from string", e);
          }
      }
docs: Generates Private Key from Base64 encoded string
  
  @param key Base64 encoded string which represents the key
  
  @return The PrivateKey
  @throws MangooEncryptionException if getting private key from string fails