473,224 Members | 1,540 Online

# Algorithms: verhoeff, base64, alleged RC4. in VBA (excel)

2 2Bits
Excuse me, I speak Spanish. I am self-taught in computer science and I ventured to make a payment system for my small shop. the problem is; that for my billing system to work the algorithms are missing: presumed rc4, verhoeff and base64, in VBA language, I don't understand this and I wanted to ask if you had any of this among your algorithms that you could share with me, I am very grateful.

The algorithms must satisfy the result of the following examples:

'*******input data
Authorization: maximum fifteen digits (numbers).
Invoice: maximum twelve digits (numbers).
DNI: minimum value = zero (one digit), maximum twelve digits (numbers).
Date: YYYYMMDD, eight digits (numbers).
Cost: minimum value = 1, no maximum value (rounded number).
A, B, C, D, E, F, G, H, I, J, K, L, M, N, P, Q, R, S, T, U, V, W, X, Y, Z,
a, b, c, d, e, f, g, h, i, j, k, m, n, p, q, r, s, t, u, v, w, x, y, z, 2,
3, 4, 5, 6, 7, 8, 9, =, #, (, ), *, +, -, _, \, @, [, ], {, }, %, \$

'*******process:
Algorithms: verhoeff, base64, alleged RC4

'*******result:
Control code: generated from the aforementioned algorithms, it will be an alphanumeric data of up to ten characters, represented in groups of 2 separated by the character "-". Example: 7B-CD-23-04-12

Example:

'*******input data
Authorization: 8004007852576
Invoice: 50753
DNI: 1048433012
Date: 2008/08/19 = 20080819
Cost= 91112.4 = 91112

'*******process:
Algorithms: verhoeff, base64, alleged RC4

'*******result:
Control code: 1F-A8-98-84-1A
Feb 22 '21 #1
3 3090
cactusdata
212 Expert 128KB
But how?
The Verhoeff algorithm, for example, generates a check digit for a number, so it cannot be related to or applied to the password.
Feb 23 '21 #2
freemanthink
2 2Bits
You're right, I think I got complicated up there. What I was trying to do is look for an encryption, using VERHOEFF, RC4 and BASE64, which asks for Internal Taxes of my country ... but I already solved the VERHOEFF problem. What I would like is; generate a cipher using the RC4 algorithm, VBA language. In such a way as to satisfy the following examples:

example1.
message: yK5K
algorithm: RC4 in VBA
encryption: 6212AF1B

example2.
message: kvP8
key: 442F3w5AggG7644D737asd4BH5677sasdL4%44643(3C3674F4 45644
algorithm: RC4 in VBA
encryption: 71D561C8

the code of example 2, is separated, the correct thing is:
Expand|Select|Wrap|Line Numbers
1. key: 442F3w5AggG7644D737asd4BH5677sasdL4%44643(3C3674F445644
Note. I have tried using the algorithm posted by @Rabbit (https://bytes.com/topic/access/insig...m-vba-vbscript) but I can't get it to satisfy the above examples.
Feb 23 '21 #3
Rabbit
12,516 Expert Mod 8TB
The code in the article is fine. If you read it, the last paragraph explains why it won't match your situation. You just need to adjust it based on that.
Feb 24 '21 #4