security

package
v1.36.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package security : 暗号関連処理

Index

Constants

View Source
const CertTerm = 1

CertTerm : 自己署名の期限

View Source
const KeyPass = "TWSNMPba98be2110e9653f249aa2b38706cb02YMI"

KeyPass : 秘密鍵のパスワード

Variables

This section is empty.

Functions

func GenPrivateKey

func GenPrivateKey(bits int, keypass string) (string, error)

GenPrivateKey : Generate RSA Key

func GetRawKeyPem

func GetRawKeyPem(p, keypass string) string

GetRawKeyPem : 暗号化を解除した秘密鍵のPEMを取得する

func GetSSHPublicKey

func GetSSHPublicKey(key string) (string, error)

GetSSHPublicKey : SSHの公開鍵をOpenSSH形式で取得する

func MakeWebAPICert

func MakeWebAPICert(host, keypass, ips string) ([]byte, []byte, error)

func PasswordHash

func PasswordHash(pw string) string

PasswordHash : パスワードハッシュを作る

func PasswordVerify

func PasswordVerify(hash, pw string) bool

PasswordVerify : パスワードがハッシュにマッチするかどうかを調べる

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL