lib/stribog/compression.rb in stribog-0.1.0 vs lib/stribog/compression.rb in stribog-0.1.1
- old
+ new
@@ -11,11 +11,11 @@
@n = n
@message = message
@hash_vector = hash_vector
end
- def start
+ def call
vector = lpsx_func @n, @hash_vector
vector = func_e vector, @message
vector = vector ^ @hash_vector
vector ^ @message
end
@@ -60,10 +60,10 @@
def small_linear_transformation(vector)
BinaryVector.from_byte(
not_zeros_indexes(vector)
.inject(0) { |acc, elem| acc ^ MATRIX_A[elem] }
- ).addition_to(size: 64)
+ ).addition_by_zeros(size: 64)
end
# rubocop:disable Style/EachWithObject
def func_e(first_vector, second_vector)
vectors = CONSTANTS_C