You must learn to sit perfectly still with every muscle tense for long periods.
Various things will happen to you while you are practising these positions; they must be carefully analysed and described.
Note down the duration of practice; the severity of the pain (if any) which accompanies it, the degree of rigidity attained, and any other pertinent matters.
When you have progressed up to the point that a saucer filled to the brim with water and poised upon the head does not spill one drop during a whole hour,
and when you can no longer perceive the slightest tremor in any muscle; when, in short, you are perfectly steady and easy, you will be admitted for examination;
and, should you pass, you will be instructed in more complex and difficult practices.
- Aleister Crowley, Liber E vel Exercitiorum, 1911. https://hermetic.com/crowley/equinox/i/i/eqi01005 -- given a path to a PEM encoded PKCS#8 formatted RSA private key and a
-- JWT Claims Set (RFC 7519) represented as a strict ByteString,
-- return a strict ByteString representing a base64 encoded RSA256-signed JWS.
generateJWT :: FilePath -> B.ByteString -> IO (Maybe B.ByteString)
generateJWT fp claims = (fmap unJwt <$>) . (maybe (return Nothing) (fmap eitherToMaybe . encodeClaims) =<<)
$ fromPKCS8 fp
where eitherToMaybe = preview _Right
encodeClaims = (flip $ rsaEncode RS256) claims
Arguably newtype wrappers could (or even should) be introduced in place of the more primitive FilePaths and ByteStrings - but even if they were, the type names would either be prohibitively long, or fail to communicate the full depth of information of the comment.