Encryption: Extract encryption into service (#38442)

* Add encryption service

* Add tests for encryption service

* Inject encryption service into http server

* Replace encryption global function usage in login tests

* Apply suggestions from code review

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>

* Migrate to Wire

* Undo non-desired changes

* Move Encryption bindings to OSS Wire set

Co-authored-by: Joan López de la Franca Beltran <joanjan14@gmail.com>
Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
This commit is contained in:
Tania B
2021-08-30 19:39:55 +02:00
committed by GitHub
co-authored by Emil Tullstedt Joan López de la Franca Beltran Joan López de la Franca Beltran
parent 79e79fe244
commit a0108a1e5b
7 changed files with 161 additions and 22 deletions
+6
View File
@@ -0,0 +1,6 @@
package encryption
type Service interface {
Encrypt([]byte, string) ([]byte, error)
Decrypt([]byte, string) ([]byte, error)
}