Template:Committed identity/testcases

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

Simple example

[edit source]
sha512(abc) – single parameter, linking to SHA-512 by default
{{Committed identity|ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f}}

{{Committed identity}}

Committed identity: ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f is an SHA-512 commitment to this user's real-life identity.

{{Committed identity/sandbox}}

Committed identity: ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f is a SHA-512 commitment to this user's real-life identity.
sha256(abc) – |2=SHA-256
{{Committed identity|ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad|SHA-256}}

{{Committed identity}}

Committed identity: ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad is an SHA-256 commitment to this user's real-life identity.

{{Committed identity/sandbox}}

Committed identity: ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad is a SHA-256 commitment to this user's real-life identity.

Errors

[edit source]

Empty-string hashes

[edit source]
SHA-256
{{Committed identity|e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855|SHA-256}}

{{Committed identity}}

e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 is hash of an empty string, it isn't a valid committed identity.

{{Committed identity/sandbox}}

e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 is hash of an empty string, it isn't a valid committed identity.
SHA-384
{{Committed identity|38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b|SHA-384}}

{{Committed identity}}

38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b is hash of an empty string, it isn't a valid committed identity.

{{Committed identity/sandbox}}

38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b is hash of an empty string, it isn't a valid committed identity.
SHA-512
{{Committed identity|cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e|SHA-512}}

{{Committed identity}}

cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e is hash of an empty string, it isn't a valid committed identity.

{{Committed identity/sandbox}}

cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e is hash of an empty string, it isn't a valid committed identity.

Algo mismatch (bad length)

[edit source]

These errors are not handled by the template yet:

Too short for SHA-512
{{Committed identity|ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad}}

{{Committed identity}}

Committed identity: ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad is an SHA-512 commitment to this user's real-life identity.

{{Committed identity/sandbox}}

Committed identity: ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad is a SHA-512 commitment to this user's real-life identity.
Too long for SHA-256
{{Committed identity|ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f|SHA-256}}

{{Committed identity}}

Committed identity: ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f is an SHA-256 commitment to this user's real-life identity.

{{Committed identity/sandbox}}

Committed identity: ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f is a SHA-256 commitment to this user's real-life identity.