How to use the rhash.HAS160 function in RHash

To help you get started, we’ve selected a few RHash examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rhash / RHash / bindings / python / test_rhash.py View on Github external
'0bdc9d2d256b3ee9daae347be6f4dc835a467ffe', ctx.hash(rhash.RIPEMD160))
        self.assertEqual(
            'd42c539e367c66e9c88a801f6649349c21871b4344c6a573f849fdce62f314dd',
            ctx.hash(rhash.GOST94))
        self.assertEqual(
            'e74c52dd282183bf37af0079c9f78055715a103f17e3133ceff1aacf2f403011',
            ctx.hash(rhash.GOST94_CRYPTOPRO))
        self.assertEqual(
            'ba31099b9cc84ec2a671e9313572378920a705b363b031a1cb4fc03e01ce8df3',
            ctx.hash(rhash.GOST12_256))
        self.assertEqual(
            '8b2a40ecab7b7496bc4cc0f773595452baf658849b495acc3ba017206810efb00420ccd73fb3297e0f7890941b84ac4a8bc27e3c95e1f97c094609e2136abb7e',
            ctx.hash(rhash.GOST12_512))
        self.assertEqual(
            '4872bcbc4cd0f0a9dc7c2f7045e5b43b6c830db8',
            ctx.hash(rhash.HAS160))
        self.assertEqual(
            'bf5ce540ae51bc50399f96746c5a15bd', ctx.hash(rhash.SNEFRU128))
        self.assertEqual(
            '45161589ac317be0ceba70db2573ddda6e668a31984b39bf65e4b664b584c63d',
            ctx.hash(rhash.SNEFRU256))
        self.assertEqual(
            'abd37534c7d9a2efb9465de931cd7055ffdb8879563ae98078d6d6d5',
            ctx.hash(rhash.SHA224))
        self.assertEqual(
            'ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb',
            ctx.hash(rhash.SHA256))
        self.assertEqual(
            '54a59b9f22b0b80880d8427e548b7c23abd873486e1f035dce9cd697e85175033caa88e6d57bc35efae0b5afd3145f31',
            ctx.hash(rhash.SHA384))
        self.assertEqual(
            '1f40fc92da241694750979ee6cf582f2d5d7d28e18335de05abc54d0560e0f5302860c652bf08d560252aa5e74210546f369fbbbce8c12cfc7957b2652fe9a75',