def test_ps(self): from acme.jose.jwa import PS256 sig = PS256.sign(RSA1024_KEY, b'foo') self.assertTrue(PS256.verify(RSA1024_KEY.public_key(), b'foo', sig)) self.assertFalse( PS256.verify(RSA1024_KEY.public_key(), b'foo', sig + b'!'))
def test_ps(self): from acme.jose.jwa import PS256 sig = PS256.sign(RSA1024_KEY, 'foo') self.assertTrue(PS256.verify(RSA1024_KEY, 'foo', sig) is True) self.assertTrue(PS256.verify(RSA1024_KEY, 'foo', sig + '!') is False)
def test_ps(self): from acme.jose.jwa import PS256 sig = PS256.sign(RSA1024_KEY, b'foo') self.assertTrue(PS256.verify(RSA1024_KEY.public_key(), b'foo', sig)) self.assertFalse(PS256.verify( RSA1024_KEY.public_key(), b'foo', sig + b'!'))