We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stack ghci --test cardano-crypto:cardano-crypto-test
import Cardano.Crypto.Wallet.Encrypted :set -XOverloadedStrings import qualified Data.ByteString as BS bytes = "(\134\242|I\141L\EM\NUL\128\173\252q\191\172\167>f \218\222\167.\136\DC4\216\191\253r8cD8&I\STX;\185&\177\172E\241\185\241\157\226\r\163+\EM\GS\232-\188\250[E^N\129J\158\STX\134\188!\241\DLEzt\222\199\247U\143\ETB\128,\226Q\"\230\234\"\191\177\250\230\167\n\214X\244z\\" :: BS.ByteString pwd = "" :: BS.ByteString
BS.take 1 on input does not affect output:
BS.take 1
λ> k1 = unEncryptedKey $ encryptedCreateDirectWithTweak bytes pwd λ> k2 = unEncryptedKey $ encryptedCreateDirectWithTweak (BS.take 1 bytes) pwd λ> k1 == k2 True -- 🧐
BS.take 0 on input causes SIGSEGV.
BS.take 0
λ> unEncryptedKey $ encryptedCreateDirectWithTweak (BS.take 0 bytes) pwd "fish: 'stack ghci --test cardano-crypt…' terminated by signal SIGSEGV (Address boundary error)
It is mentioned in the doc-comment that the input must be 96 bytes long. Are these findings as expected? https://github.com/input-output-hk/cardano-crypto/blob/3c5db489c71a4d70ee43f5f9b979fcde3c797f2a/src/Cardano/Crypto/Wallet/Encrypted.hs#L95-L96
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Setup
Oddness 1
BS.take 1
on input does not affect output:Oddness 2
BS.take 0
on input causes SIGSEGV.Comment
It is mentioned in the doc-comment that the input must be 96 bytes long. Are these findings as expected?
https://github.com/input-output-hk/cardano-crypto/blob/3c5db489c71a4d70ee43f5f9b979fcde3c797f2a/src/Cardano/Crypto/Wallet/Encrypted.hs#L95-L96
The text was updated successfully, but these errors were encountered: