Rimossi rol
This commit is contained in:
parent
167230d18d
commit
71266d07c0
@ -47,11 +47,6 @@ class InvalidValue(AssemblerException):
|
|||||||
def __init__(self, instruction):
|
def __init__(self, instruction):
|
||||||
super().__init__("Invalid value while assembling: {}".format(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:
|
class VMAssembler:
|
||||||
|
|
||||||
def __init__(self, key):
|
def __init__(self, key):
|
||||||
|
@ -4,11 +4,6 @@
|
|||||||
#include "vmas.h"
|
#include "vmas.h"
|
||||||
#include <string.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) {
|
void VM::encryptOpcodes(uint8_t *key) {
|
||||||
uint8_t arr[256];
|
uint8_t arr[256];
|
||||||
uint32_t i, j, tmp, keysize;
|
uint32_t i, j, tmp, keysize;
|
||||||
|
Loading…
Reference in New Issue
Block a user