Skip to content

Commit

Permalink
ajust Decrypt
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrosaints committed Dec 14, 2023
1 parent e792147 commit 9f38de6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crypt_aes.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ func (crypt Crypt) Decrypt(encryptedData string) ([]byte, error) {
// Criar um modo de cifra em bloco com o bloco e o IV
mode := cipher.NewCFBDecrypter(block, crypt.Iv)

// Extrai o vetor de inicialização (IV) do dado criptografado
data = data[aes.BlockSize:]

// Criar um slice para o texto decifrado (tamanho igual ao texto cifrado)
decrypted := make([]byte, len(data))

Expand Down

0 comments on commit 9f38de6

Please sign in to comment.