Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. General Discussion
  3. [MySigningAtsha204Soft 1.5.4] HMAC linux keygenerator

[MySigningAtsha204Soft 1.5.4] HMAC linux keygenerator

Scheduled Pinned Locked Moved General Discussion
1 Posts 1 Posters 622 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mr.Osaka
    wrote on last edited by Mr.Osaka
    #1

    Hallo,
    for linux user i wrote a helpful script for creating random key (32 hex) for
    MyConfig.h - #define MY_HMAC_KEY with the correct formatting.

    Stefano

    #!/bin/bash
    
    # mysensors_HMAC-key.sh
    #
    # generate a hex 32bit random key for 
    # MyConfig.h - #define MY_HMAC_KEY 0x00,0x00,0x00,......
    # 
    #
    # Created by Stefano Gottardi <st.gottardi (at) libero.it>
    #
    # This program is free software; you can redistribute it and/or
    # modify it under the terms of the GNU General Public License
    # version 2 as published by the Free Software Foundation.
    
    if ! which openssl > /dev/null
    then
    	echo "openssl is not installed"
    	exit -1
    fi
    
    key=`openssl rand -hex 32`
    COUNTER=2
    MYSENS_KEY="0x${key:0:2}"
    
    until [  $COUNTER -eq 64 ]; do
    	STRING=${key:$COUNTER:2}
    	MYSENS_KEY="$MYSENS_KEY,0x$STRING"
    	let COUNTER+=2
    done
    
    echo $MYSENS_KEY
    
    exit 0
    
    1 Reply Last reply
    3

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better 💗

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    14

    Online

    12.0k

    Users

    11.2k

    Topics

    113.4k

    Posts


    Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • MySensors
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular