Package ninja.utils

Class Crypto


  • public class Crypto
    extends Object
    • Constructor Detail

      • Crypto

        @Inject
        public Crypto​(NinjaProperties ninjaProperties)
        Secret is a secret key. Usually something like: "Fxu6U5BTGIJZ06c8bD1xkhHc3Ct5JZXlst8tJ1K5uJJPaLdceDo6CUz0iWpjjQUY".
        Parameters:
        applicationSecret - the secret to use for signing.
        random - the random generator to be used for generating the secret => usually new Random(), but can also be set to e.g. new Random(1) to test the function.
    • Method Detail

      • signHmacSha1

        public String signHmacSha1​(String message)