artifactdecMake returns a base64 type 0x0004 artifact (saml-bindings-2.0-os §3.6.4.1) with the given EndpointIndex, SourceID and a MessageHandle filled with handle.
(index uint16, sourceID [20]byte, handle byte)
| 21 | // (saml-bindings-2.0-os §3.6.4.1) with the given EndpointIndex, SourceID and |
| 22 | // a MessageHandle filled with handle. |
| 23 | func artifactdecMake(index uint16, sourceID [20]byte, handle byte) string { |
| 24 | raw := make([]byte, 4, 44) |
| 25 | binary.BigEndian.PutUint16(raw[0:2], 0x0004) |
| 26 | binary.BigEndian.PutUint16(raw[2:4], index) |
| 27 | raw = append(raw, sourceID[:]...) |
| 28 | raw = append(raw, bytes.Repeat([]byte{handle}, 20)...) |
| 29 | return base64.StdEncoding.EncodeToString(raw) |
| 30 | } |
| 31 | |
| 32 | func artifactdecIDPSourceID() [20]byte { |
| 33 | return sha1.Sum([]byte(spcovIDPEntityID)) //nolint:gosec // G401: SourceID |
no outgoing calls
no test coverage detected