upstream sync

This commit is contained in:
Senad Uka
2023-10-19 07:57:48 +02:00
parent 5b1acd1c5f
commit 44efa194fc
5 changed files with 93 additions and 12 deletions

View File

@@ -7,10 +7,17 @@ import (
"crypto/cipher"
"crypto/rand"
"encoding/base64"
"encoding/binary"
"fmt"
"io"
)
func CovertUintToByte32(id uint) [32]byte {
b := make([]byte, 32)
binary.LittleEndian.PutUint32(b, uint32(id))
return [32]byte(b)
}
type EncryptionClient interface {
Encrypt(string) (string, error)
Decrypt(string) (string, error)