{"id":570,"date":"2024-09-10T16:17:56","date_gmt":"2024-09-10T10:47:56","guid":{"rendered":"https:\/\/www.bhuvankrishna.in\/blog\/?p=570"},"modified":"2024-09-10T16:17:56","modified_gmt":"2024-09-10T10:47:56","slug":"generate-a-key-for-use-as-salt-or-any-other-form","status":"publish","type":"post","link":"https:\/\/www.bhuvankrishna.in\/blog\/2024\/09\/10\/generate-a-key-for-use-as-salt-or-any-other-form\/","title":{"rendered":"Generate a key for use as salt or any other form"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">While installing or configuring setups we may need to generate a 32 character long random keys may that be for salt or used for flask sessions or while setting up ELK stack and you need to create this key. These 2 commands will generate the desired key. If needed modify or alter the random function to get variety of keys.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>python3\n>>import os\n>>print(os.urandom(32).hex())<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>While installing or configuring setups we may need to generate a 32 character long random keys may that be for salt or used for flask sessions or while setting up ELK stack and you need to create this key. These 2 commands will generate the desired key. If needed modify or alter the random function\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.bhuvankrishna.in\/blog\/2024\/09\/10\/generate-a-key-for-use-as-salt-or-any-other-form\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-570","post","type-post","status-publish","format-standard","hentry","category-uncategorised"],"_links":{"self":[{"href":"https:\/\/www.bhuvankrishna.in\/blog\/wp-json\/wp\/v2\/posts\/570","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bhuvankrishna.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bhuvankrishna.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bhuvankrishna.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bhuvankrishna.in\/blog\/wp-json\/wp\/v2\/comments?post=570"}],"version-history":[{"count":1,"href":"https:\/\/www.bhuvankrishna.in\/blog\/wp-json\/wp\/v2\/posts\/570\/revisions"}],"predecessor-version":[{"id":571,"href":"https:\/\/www.bhuvankrishna.in\/blog\/wp-json\/wp\/v2\/posts\/570\/revisions\/571"}],"wp:attachment":[{"href":"https:\/\/www.bhuvankrishna.in\/blog\/wp-json\/wp\/v2\/media?parent=570"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bhuvankrishna.in\/blog\/wp-json\/wp\/v2\/categories?post=570"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bhuvankrishna.in\/blog\/wp-json\/wp\/v2\/tags?post=570"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}