chiradeep / go-nitro

A Golang client to the Citrix ADC API
Apache License 2.0
18 stars 21 forks source link

Updating package with AESGCM encryption support. #37

Closed dheerajng closed 4 years ago

dheerajng commented 4 years ago

Updating package with the support of AES GCM based encryption of password field. PBKDF2 is used to derive the key which is then used in AES encryption.

Unit test output:

=== RUN   TestEncryptDecrypt
--- PASS: TestEncryptDecrypt (0.01s)
    crypto_test.go:24: Test encryption decryption using AES GCM
    crypto_test.go:33: Success: Decryption provided correct plain text
    crypto_test.go:40: Success: Decrypting tampered cipher text doesn't give anything
    crypto_test.go:47: Success: Decryption with different Master key doesn't work.

Signed-off-by: dheerajng dhiraj.gedam@citrix.com

dheerajng commented 4 years ago

Could you update the docs as well on how to create a client

Included an example in README.

dheerajng commented 4 years ago

@chiradeep: Any comment regarding this PR?