Cryptography Basics – Block ciphers and modes ECEN 4133 Jan 26, 2021 Alternative to stream cipher: Block Ciphers Today’s most common block cipher: AES (Advanced…
#include #include #include int i = 1; int main(void) { int j = 10; int *k = malloc(sizeof(int)); *k = 4; if (fork()) { i…
ECS 150 – Course Introduction Prof. Joël Porquet-Lupine UC Davis – 2020/2021 Copyright © 2017-2021 Joël Porquet-Lupine – CC BY-NC-SA 4.0 International License / 1/9…
#include #include #include int main(void) { int fd; printf(“Hello #1 ”); fd = open(“myfile.txt”, O_WRONLY | O_CREAT, 0644); dup2(fd, STDOUT_FILENO); close(fd); printf(“Hello #2 ”); return…
#include #include int main(void) { printf(“Hello “); sleep(2); printf(“world! ”); write(STDOUT_FILENO, “Hello “, 6); sleep(2); write(STDOUT_FILENO, “world! “, 7); return 0; }
ECS 150 – OS Introduction Prof. Joël Porquet-Lupine UC Davis – 2020/2021 Copyright © 2017-2021 Joël Porquet-Lupine – CC BY-NC-SA 4.0 International License / 1…
#include #include int main(void) { pid_t pid; pid = fork(); if (pid > 0) printf(“I’m the parent! ”); else if (pid == 0) printf(“I’m the…
#include #include #include void alarm_handler(int signum) { printf(“ Beep, beep, beep! ”); } int main(void) { struct sigaction sa; sigset_t ss; /* Ignore Ctrl-C */…
ECS 150 – Project 1 Prof. Joël Porquet-Lupine UC Davis – 2020/2021 Copyright © 2017-2021 Joël Porquet-Lupine – CC BY-NC-SA 4.0 International License / 1…
#include #include #include #include int main(void) { pid_t pid; pid = fork(); if (pid != 0) { /* Parent */ int status; wait(&status); /* ==…