This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# created by Leandro Rometsch on 07.06.2020 | |
# TU Darmstadt - Blockchain Praktikum 2020 | |
# This script will 1. take the path of a file, 2. check if the path is valid, 3. encrypt the file based on the | |
# standard symmetric PDF encryptopn, 4. upload it to the public IPFS and 5. output IPFS hash + password | |
# Example usage: | |
# python3 encrypt_and_upload.py /home/Documents/some_document.pdf | |
# | |
# | ---------------------------------------------------------- | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "stdio.h" | |
#include <math.h> | |
#include <stdbool.h> | |
#include <stdlib.h> | |
// by Leandro Rometsch | |
int main(int argc, char *argv[]) { | |
signed int a; | |
signed int b; // signed -> algo works with negative numbers | |
int result = 0; |