Skip to main content
  • Home
  • login
  • Browse the archive

    swh mirror partner logo
swh logo
SoftwareHeritage
Software
Heritage
Mirror
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Raw File
Permalink

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
content badge Iframe embedding
swh:1:cnt:ac86e55e6f6bc90e027bdba9ec0c3b2fec94a521

try:
    import unittest2 as unittest
except ImportError:
    import unittest

from tlsfuzzer.handshake_helpers import curve_name_to_hash_tls13

class TestCurveNameToHashTLS13(unittest.TestCase):
    def test_nist_p256(self):
        self.assertEqual("sha256", curve_name_to_hash_tls13("NIST256p"))

    def test_nist_p384(self):
        self.assertEqual("sha384", curve_name_to_hash_tls13("NIST384p"))

    def test_nist_p521(self):
        self.assertEqual("sha512", curve_name_to_hash_tls13("NIST521p"))

    def test_undefined_curve_name(self):
        with self.assertRaises(ValueError):
            curve_name_to_hash_tls13("P-256")

ENEA — Copyright (C), ENEA. License: GNU AGPLv3+.
Legal notes  ::  JavaScript license information ::  Web API

back to top