MCPcopy Create free account
hub / github.com/crewjam/saml / TestRegisteredDigestMethodURIs

Function TestRegisteredDigestMethodURIs

xmlenc/algorithms_test.go:19–33  ·  view source on GitHub ↗

TestRegisteredDigestMethodURIs asserts that the digest methods are registered under the URIs assigned by RFC 4051, which is what other implementations send, as well as under the URIs earlier releases of this package emitted.

(t *testing.T)

Source from the content-addressed store, hash-verified

17// under the URIs assigned by RFC 4051, which is what other implementations send,
18// as well as under the URIs earlier releases of this package emitted.
19func TestRegisteredDigestMethodURIs(t *testing.T) {
20 for _, uri := range []string{
21 "http://www.w3.org/2000/09/xmldsig#sha1",
22 "http://www.w3.org/2001/04/xmlenc#sha256",
23 "http://www.w3.org/2001/04/xmldsig-more#sha384",
24 "http://www.w3.org/2001/04/xmlenc#sha512",
25 "http://www.w3.org/2001/04/xmlenc#ripemd160",
26 "http://www.w3.org/2000/09/xmldsig#sha256",
27 "http://www.w3.org/2000/09/xmldsig#sha512",
28 "http://www.w3.org/2000/09/xmldsig#ripemd160",
29 } {
30 _, ok := digestMethods[uri]
31 assert.Check(t, ok, "digest method not registered: %s", uri)
32 }
33}
34
35// TestRegisteredGCMDecrypters asserts that every AES-GCM key size is available,
36// mirroring what cbc.go already provides for AES-CBC.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected