Skip to content

Commit

Permalink
Merge pull request #419 from pedrosaints/main
Browse files Browse the repository at this point in the history
ajust Decrypt
  • Loading branch information
armando-couto authored Dec 14, 2023
2 parents e792147 + 9f38de6 commit 4cf6dc8
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 4cf6dc8

Please sign in to comment.