Skip to content

Instantly share code, notes, and snippets.

View saobernardo's full-sized avatar
🎯
Typing... not AI, typing

Lucas São Bernardo saobernardo

🎯
Typing... not AI, typing
View GitHub Profile
@saobernardo
saobernardo / base64.js
Created June 10, 2022 19:53
Classe de criptografia/descriptografia base 64 JS
export class Base64 {
private PADCHAR: string = '=';
private ALPHA: string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
private getByte(s: string, i: number): number {
const x = s.charCodeAt(i);
return x;
}
private getByte64(s: string, i: number): number {