# Hashing de Segredo + Payload para SSO

**URL:** <https://meta.discourse.org/t/hashing-secret-payload-for-sso/169284>\
**Category:** SSO\
**Created:** [Novembro 4, 2020, 10:01pm UTC](https://meta.discourse.org/t/hashing-secret-payload-for-sso/169284 "2020-11-04T22:01:14Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![nategoethel](https://avatars.discourse-cdn.com/v4/letter/n/90ced4/32.png) [@nategoethel](https://meta.discourse.org/u/nategoethel)\
**Post date:** [Novembro 5, 2020, 3:40pm UTC](https://meta.discourse.org/t/hashing-secret-payload-for-sso/169284/9 "2020-11-05T15:40:43Z")

</div>

Ótima observação! Corrigi isso aqui adicionando o caractere de nova linha aos parâmetros do .Trim():

`payloadURL := strings.Trim(fmt.Sprint(q["sso"]), "[]\n")`

Então, minha saída agora é:

```
payloadURL = bm9uY2U9Y2I2ODI1MWVlZmI1MjExZTU4YzAwZmYxMzk1ZjBjMGI=
sig = 2828aa29899722b35a2f191d34ef9b3ce695e0e6eeec47deb46d588d70c7cb56
payloadRaw = nonce=cb68251eefb5211e58c00ff1395f0c0b
payload256 = HOFJT5RIS29qCSvpsVzMHNr7H4Rgo4OPuw4Ig8Q5BHE=

```

---

_[View the full topic](https://meta.discourse.org/t/hashing-secret-payload-for-sso/169284)._
