ComputerCraft Archive

password

computer utility kepler155c github

Description

ComputerCraft OS

Installation

Copy one of these commands into your ComputerCraft terminal:

wget:wget https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/apps/password.lua password
Archive:wget https://cc.shobie.xyz/cc/get/gh-kepler155c-opus-sys-apps-password password
Quick Install: wget https://cc.shobie.xyz/cc/get/gh-kepler155c-opus-sys-apps-password password

Usage

Run: password

Tags

none

Source

View Original Source

Code Preview

local Security = require('opus.security')
local SHA      = require('opus.crypto.sha2')
local Terminal = require('opus.terminal')

local password = Terminal.readPassword('Enter new password: ')

if password then
	Security.updatePassword(SHA.compute(password))
	print('Password updated')
end