rc4

package
v1.21.9 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

パッケージrc4はBruce Schneierの「応用暗号化」で定義されている RC4暗号を実装しています。

RC4は暗号学的に脆弱であり、安全なアプリケーションには使用すべきではありません。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cipher

type Cipher struct {
	// contains filtered or unexported fields
}

Cipherは特定のキーを使用したRC4のインスタンスです。

func NewCipher

func NewCipher(key []byte) (*Cipher, error)

NewCipherは新しいCipherを作成し、返します。キーアーギュメントはRC4キーであり、少なくとも1バイト、最大256バイトである必要があります。

func (*Cipher) Reset deprecated

func (c *Cipher) Reset()

Resetはキーデータをゼロ化し、Cipherを使用できなくします。

Deprecated: Resetはキーがプロセスのメモリから完全に削除されることを保証できません。

func (*Cipher) XORKeyStream

func (c *Cipher) XORKeyStream(dst, src []byte)

XORKeyStreamは、キーストリームを使用してsrcとXOR演算した結果をdstに設定します。 Dstとsrcは完全に重なるか、まったく重ならない必要があります。

type KeySizeError

type KeySizeError int

func (KeySizeError) Error

func (k KeySizeError) Error() string

Jump to

Keyboard shortcuts

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