V
V
Vitaly2022-01-26 14:27:25
JavaScript
Vitaly, 2022-01-26 14:27:25

How to hash a string according to GOST 34.311 so that it is a base64 string?

It is necessary to hash requestId (uuid v4) according to GOST 34.311, so that it is a base64 string with a length of 44
characters (32 bytes after decoding) .


Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2022-01-26
@Scorpiored88

Why are libraries needed?

let data = '12345678901234567890123456789012';
let base64data = Buffer.from(data).toString('base64');

console.log(base64data); // MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI=

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question