bin/actions/cipher.js
function handleCipher(opts, err) {
  if (err) {
    switch (err.name) {
      case nodecipher.errors.BAD_ALGORITHM:
        handleInvalidAlgorithm(opts, err);
        break;
      case nodecipher.errors.BAD_DIGEST:
        handleInvalidHash(opts, err);
        break;
      case nodecipher.errors.BAD_FILE:
        handleEnoentError(opts, err);
        break;
      case nodecipher.errors.BAD_DECRYPT:
        handleBadDecrypt(opts, err);
        break;
      default:
        handleUnknownErrors(opts, err);
    }
    process.exit(1);
  } else {
    handleCipherSuccess(opts, err);
  }
}
function handleCipher(opts, err) {
  if (err) {
    switch (err.name) {
      case nodecipher.errors.BAD_ALGORITHM:
        handleInvalidAlgorithm(opts, err);
        break;
      case nodecipher.errors.BAD_DIGEST:
        handleInvalidHash(opts, err);
        break;
      case nodecipher.errors.BAD_FILE:
        handleEnoentError(opts, err);
        break;
      case nodecipher.errors.BAD_DECRYPT:
        handleBadDecrypt(opts, err);
        break;
      default:
        handleUnknownErrors(opts, err);
    }
    process.exit(1);
  } else {
    handleCipherSuccess(opts, err);
  }
}
function handleCipher ( opts , err ) { if ( err ) { switch ( err . name ) { case nodecipher . errors . BAD_ALGORITHM : handleInvalidAlgorithm ( opts , err ) ; break ; case nodecipher . errors . BAD_DIGEST : handleInvalidHash ( opts , err ) ; break ; case nodecipher . errors . BAD_FILE : handleEnoentError ( opts , err ) ; break ; case nodecipher . errors . BAD_DECRYPT : handleBadDecrypt ( opts , err ) ; break ; default : handleUnknownErrors ( opts , err ) ; } process . exit ( 1 ) ; } else { handleCipherSuccess ( opts , err ) ; } }
Called when the cipher has completed. Handles errors if there are any.

@param {Object} opts
@param {Error|null} err
Called when the cipher has completed . Handles errors if there are any .