From c7adc1dfb81329ab6daf824b5f6ffa7a1661663f Mon Sep 17 00:00:00 2001 From: JT Olio Date: Mon, 13 Aug 2018 17:05:31 -0600 Subject: [PATCH] shorter ids (#227) * shorter ids * fix test --- pkg/provider/identity.go | 2 +- pkg/provider/identity_test.go | 34 +++++++++++++++++----------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/pkg/provider/identity.go b/pkg/provider/identity.go index 07f543a47..1616f88da 100644 --- a/pkg/provider/identity.go +++ b/pkg/provider/identity.go @@ -26,7 +26,7 @@ import ( ) const ( - IdentityLength = uint16(256) + IdentityLength = uint16(256 / 8) // 256 bits ) var ( diff --git a/pkg/provider/identity_test.go b/pkg/provider/identity_test.go index 9e3d3c8ad..adf856734 100644 --- a/pkg/provider/identity_test.go +++ b/pkg/provider/identity_test.go @@ -144,28 +144,28 @@ func tempIdentity(t *testing.T) (func(), *IdentityConfig, *FullIdentity, uint16) difficulty := uint16(12) chain := `-----BEGIN CERTIFICATE----- -MIIBQTCB6KADAgECAhEA7iLmNy8uop2bC4Yv1uXvwjAKBggqhkjOPQQDAjAAMCIY -DzAwMDEwMTAxMDAwMDAwWhgPMDAwMTAxMDEwMDAwMDBaMAAwWTATBgcqhkjOPQIB -BggqhkjOPQMBBwNCAATD84AzWKMs7rSuQ0pGbtQE5X6EvKe74ORUgayxLimvs0dX -1KOLg5XmbUF4bwHPvkbDLUlSCWx5qgFmL+XhuR5doz8wPTAOBgNVHQ8BAf8EBAMC -BaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAwGA1UdEwEB/wQCMAAw -CgYIKoZIzj0EAwIDSAAwRQIgQkJgjRar0nIOQbEAin5bQe4+9BUjSIQzrlkJgXsC -liICIQDz6LeN9nRKCuRcqiK8tnaKbOJ+/Q3PQNHuK7coFFuB1g== +MIIBQDCB56ADAgECAhB+u3d03qyW/ROgwy/ZsPccMAoGCCqGSM49BAMCMAAwIhgP +MDAwMTAxMDEwMDAwMDBaGA8wM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AKBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MAoGCCqGSM49 +BAMCA0cAMEQCIGAZfPT1qvlnkTacojTtP20ZWf6XbnSztJHIKlUw6AE+AiB5Vcjj +awRaC5l1KBPGqiKB0coVXDwhW+K70l326MPUcg== -----END CERTIFICATE-----` key := `-----BEGIN EC PRIVATE KEY----- -MHcCAQEEILQar8Z01NkX/czx8yGevdBATINSW1+U6AQS0Sl5WbdVoAoGCCqGSM49 -AwEHoUQDQgAEw/OAM1ijLO60rkNKRm7UBOV+hLynu+DkVIGssS4pr7NHV9Sji4OV -5m1BeG8Bz75Gwy1JUglseaoBZi/l4bkeXQ== +MHcCAQEEIKGjEetrxKrzl+AL1E5LXke+1ElyAdjAmr88/1Kx09+doAoGCCqGSM49 +AwEHoUQDQgAEoLy/0hs5deTXZunRumsMkiHpF0g8wAc58aXANmr7Mxx9tzoIYFnx +0YN4VDKdCtUJa29yA6TIz1MiIDUAcB5YCA== -----END EC PRIVATE KEY-----` ic, cleanup, err := tempIdentityConfig()