cederom commented on code in PR #18396:
URL: https://github.com/apache/nuttx/pull/18396#discussion_r2809895530


##########
tools/mkpasswd.py:
##########
@@ -0,0 +1,204 @@
+#!/usr/bin/env python3
+############################################################################
+# tools/mkpasswd.py
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+"""Generate a NuttX /etc/passwd entry with a TEA-encrypted password hash.
+
+This script implements the same Tiny Encryption Algorithm (TEA) and base64
+encoding used by NuttX at runtime (libs/libc/misc/lib_tea_encrypt.c and
+apps/fsutils/passwd) to produce a passwd line suitable for embedding in a
+ROMFS image at build time.
+
+Usage:
+    python3 mkpasswd.py --user admin --password secret

Review Comment:
   password management tools provide different ways to obtain plaintext 
password string (i.e. stream, file, etc), so that plaintext password is not 
leaked over shell history.
   
   this is why it would be best to use existing POSIX solution :-)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to