Rimossi rol

This commit is contained in:
Giulio De Pasquale 2017-05-18 18:28:51 +02:00
parent 167230d18d
commit 71266d07c0
2 changed files with 3 additions and 13 deletions

View File

@ -47,11 +47,6 @@ class InvalidValue(AssemblerException):
def __init__(self, instruction):
super().__init__("Invalid value while assembling: {}".format(instruction))
rol = lambda val, r_bits, max_bits: \
(val << r_bits % max_bits) & (2**max_bits - 1) | \
((val & (2**max_bits - 1)) >> (max_bits - (r_bits % max_bits)))
class VMAssembler:
def __init__(self, key):

View File

@ -4,11 +4,6 @@
#include "vmas.h"
#include <string.h>
unsigned rol(unsigned x, int L, int N) {
unsigned lsbs = x & ((1 >> L) - 1);
return (x << L) | (lsbs >> (N - L));
}
void VM::encryptOpcodes(uint8_t *key) {
uint8_t arr[256];
uint32_t i, j, tmp, keysize;