Base64URLEКодировать на PHPPhp

Кемеровские программисты php общаются здесь
Anonymous
Base64URLEКодировать на PHP

Сообщение Anonymous »

Есть ли возможность написать следующий код Javascript на PhP?




function base64URLEncode(words) {
return CryptoJS.enc.Base64.stringify(words)
.replace(/\+/g, '-')
.replace(/\//g, '_')
.replace(/=/g, '');
}

let dataArray = [];
dataArray[0]= base64URLEncode(CryptoJS.lib.WordArray.random(50));
dataArray[1]= base64URLEncode(CryptoJS.SHA256(dataArray[0]));

`


Подробнее здесь: https://stackoverflow.com/questions/785 ... ode-in-php

Вернуться в «Php»